This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_extPart_001_01C1C388.64C2A150
Content-Type: text/plain

> -----Original Message-----
> From: Douglas J van Vliet [mailto:dougie / global.co.za]
[..] 
> Hi,
> 
> Is there a way of loading a text file in memory and then 
> accessing the lines
> one at a time?

IO.readlines('c:/autoexec.bat').each { |line| print line }

> 
> The files are 4 to 9MB's and take 15 - 20 seconds to load a 
> line at a time.
> 
> If I use SmallScript (Smalltalk), it takes less than a second 
> or two to load
> it. (remainingContents)
> 
> Dougie
> 
> 

------_extPart_001_01C1C388.64C2A150
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV
ontent-Type" CONTENText/html; charset-ASCII"> <META NAMEenerator" CONTENTS Exchange Server version 5.5.2653.12"> <TITLE>RE: Load a Text file (newbie)</TITLE> </HEAD> <BODY> <P><FONT SIZE &gt; -----Original Message-----</FONT> <BR><FONT SIZE &gt; From: Douglas J van Vliet [<A HREFailto:dougie / global.co.za">mailto:dougie / global.co.za</A>]</FONT> <BR><FONT SIZE [..] </FONT> <BR><FONT SIZE &gt; Hi,</FONT> <BR><FONT SIZE &gt; </FONT> <BR><FONT SIZE &gt; Is there a way of loading a text file in memory and then </FONT> <BR><FONT SIZE &gt; accessing the lines</FONT> <BR><FONT SIZE &gt; one at a time?</FONT> </P> <P><FONT SIZE IO.readlines('c:/autoexec.bat').each { |line| print line }</FONT> </P> <P><FONT SIZE &gt; </FONT> <BR><FONT SIZE &gt; The files are 4 to 9MB's and take 15 - 20 seconds to load a </FONT> <BR><FONT SIZE &gt; line at a time.</FONT> <BR><FONT SIZE &gt; </FONT> <BR><FONT SIZE &gt; If I use SmallScript (Smalltalk), it takes less than a second </FONT> <BR><FONT SIZE &gt; or two to load</FONT> <BR><FONT SIZE &gt; it. (remainingContents)</FONT> <BR><FONT SIZE &gt; </FONT> <BR><FONT SIZE &gt; Dougie</FONT> <BR><FONT SIZE &gt; </FONT> <BR><FONT SIZE &gt; </FONT> </P> </BODY> </HTML> ------_extPart_001_01C1C388.64C2A150--