What is the difference between:
a. while(defined(my $line = )) ...
and
b. while()
On Apr 6, 2007, at 7:52 AM, Rob Dixon wrote:
Why shift and unshift? Just use a for loop:
: Re: Text munging problem: question on while loop differences
What is the difference between:
a. while(defined(my $line = )) ...
and
b. while()
Hello,
When you say my $line = you read the content from input (maybe
So, if I put a filehandle in the diamond, instead of empty diamond,
does that mean that the first would operate line by line and the
second would pull the whole file into memory?
Thanks much,
Jen
On Apr 6, 2007, at 9:31 AM, Jeff Pang wrote:
: Re: Text munging problem: question on while
On 4/6/07, Jeni Zundel [EMAIL PROTECTED] wrote:
What is the difference between:
a. while(defined(my $line = )) ...
and
b. while()
snip
while () {}
is shorthand for
while (defined ($_ = )) {}
The biggest difference is
So, if I put a filehandle in the diamond, instead of empty diamond,
does that mean that the first would operate line by line and the
second would pull the whole file into memory?
When the diamond() is appeared with while(),it means you read the file line
by line.
ig,while(FILEHANDLE){ ..
On 4/6/07, Jeni Zundel [EMAIL PROTECTED] wrote:
So, if I put a filehandle in the diamond, instead of empty diamond,
does that mean that the first would operate line by line and the
second would pull the whole file into memory?
No, both while loops read line by line. The difference is where
On 4/6/07, Jeff Pang [EMAIL PROTECTED] wrote:
So, if I put a filehandle in the diamond, instead of empty diamond,
does that mean that the first would operate line by line and the
second would pull the whole file into memory?
When the diamond() is appeared with while(),it means you read the