On May 30, David Gilden said:
>$data = 'some
>multi line
>string';
>
> while($data){
> push(@everyline, $_);
> }
You're confusing this with
while (<FH>) {
# do something with $_;
}
You can do:
@lines = split /\n/, $data;
or you can download the IO::String module from CPAN
(http://search.cpan.org/):
use IO::String;
my $str_fh = IO::String->new($data);
while (<$str_fh>) {
push @lines, $_;
}
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** I need a publisher for my book "Learning Perl's Regular Expressions" **