in reply to Re: Removing blank lines from arrayin thread Removing blank lines from array
chomp(my @info = grep /\S/, <READ>);
-- Randal L. Schwartz, Perl hacker
chomp(@info = grep /\S/, <READ>);
chomp(my $input = <FOO>);
@info will still be visible after the chomp(). There is no enclosing scope there to cause the lexical nature to release the array.
Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
Wanted to see it, but they wouldn't reschedule it
Read the book instead
Results (264 votes). Check out past polls.