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.
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (345 votes). Check out past polls.