Re: Text munging problem: question on while loop differences

2007-04-06 Thread Jeni Zundel
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

2007-04-06 Thread Jeff Pang
: 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

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Jeni Zundel
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

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Chas Owens
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

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Jeff Pang
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){ ..

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Chas Owens
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

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Chas Owens
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