Re: file into memory

2002-12-29 Thread Jenda Krynicky
> On Tue, Dec 24, 2002 at 10:44:29AM -0800, R. Joseph Newton wrote: > > Really? In that case, you may be vastly underestimating the cost of > > I/O on performance. Bear in mind that memory has a responce time in > > the 10- ns range, while disk accesses range in the milliseconds, > > while your p

Re: file into memory

2002-12-28 Thread Paul Johnson
On Tue, Dec 24, 2002 at 10:44:29AM -0800, R. Joseph Newton wrote: > > > would like to suck the whole file into memory and processing > > > each line from > > > there. Assuming we are still talking about the line as given: @xx = ; > Bob Showalter wrote: > > I'm not sure what that accomplishes f

Re: file into memory

2002-12-24 Thread R. Joseph Newton
Hi Bob, See below > > would like to suck the whole file into memory and processing > > each line from > > there. > Bob Showalter wrote: > > I'm not sure what that accomplishes for you, but... Really? In that case, you may be vastly underestimating the cost of I/O on performance. Bear in mi

Re: file into memory

2002-12-24 Thread LRMK
load the file in to the array @lines then run following chomp(@lines); # removes all the new lines foreach $line (@lines){ #process $line } - Original Message - From: "Schwedler Kofoed" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 24, 2002 5:04 AM Subject: f

RE: file into memory

2002-12-24 Thread Bob Showalter
> -Original Message- > From: Schwedler Kofoed [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 23, 2002 6:04 PM > To: [EMAIL PROTECTED] > Subject: file into memory > > > Hi all, > > I would like to open a file with the content: > > peter 141444 > oscar e324345 > simon j85547 > > in

Re: file into memory

2002-12-24 Thread Rob Dixon
Thanks Naryan. This is my old while/for dyslexia playing me up again :-/ I think you're wrong about the interpolation though. while () won't take a control variable and I doubt it will compile in this form. Cheers, Rob "Narayan Kumar" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">new

Re: file into memory

2002-12-24 Thread Rob Dixon
OK, what you've written looks exactly right, which means your problem is somewhere else. We need to see more of your code, and to know why you think it's not working. (Don't forget to close the file after reading it!!) Just one thought: you need to be aware that each of your array elements has the

Re: file into memory

2002-12-24 Thread Narayan Kumar
I am very new to perl. I dont think I get your question. How about using "foreach" instead of "while". foreach ( @xx ) { . } while $file ( @xx ) will actually be interpolated to, $file("peter 141444 \noscar e324345 \nsimon j85547\n"); which is as good as $file(0); and will never work. Nara