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.
An electronic device
Being the designated driver
Spending time with a celebrity
I never won anything
I never play the lottery
I haven't checked my spam folder recently
Results (351 votes). Check out past polls.