> 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
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
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
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
> -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
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
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
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