OOps, hit send too soon...

This is _not_ the same as reading from a filehandle!

while (<FH>)  is NOT the same as while($variable)  {unless $variable is a
filehandle}

If working with a filehandle, the while will loop until no data is left.
With a string, it will just keep looping while true (data in string)..

Brent




                                                                                       
       
                    David Gilden                                                       
       
                    <dowda@coraconne        To:     [EMAIL PROTECTED]                 
       
                    ction.com>              cc:                                        
       
                                            Subject:     iinfinite loop                
       
                    05/30/01 12:25                                                     
       
                    PM                                                                 
       
                                                                                       
       
                                                                                       
       




The following seems to never break out of the loop,
any comments?
Thanks

Dave

#!/usr/bin/perl -w


$data = 'some
multi line
string';


    while($data){

       push(@everyline, $_);

    }




Reply via email to