Judging by the loop you seem to want, something like

$data="Hey\nThis is\nmultiline";
@everyline = split(/\n/,$data);

is probably more appropriate for your purposes. However the original
comments re: $data never being modified still hold true.

-----Original Message-----
From: Brent Michalski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 1:31 PM
To: David Gilden
Cc: [EMAIL PROTECTED]
Subject: Re: iinfinite loop



Because the while loop will loop for as long as $data is "true" or contains
data....  Considering that it has data in it, you have created an
"infinite" loop....




 

                    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