http://www.perlmonks.org?node_id=148296


in reply to •Re: Re: Removing blank lines from array
in thread Removing blank lines from array

Shouldn't that be:
my @info; chomp(@info = grep /\S/, <READ>);
so that @info is accessible later?

/prakash

Replies are listed 'Best First'.
•Re: Re: •Re: Re: Removing blank lines from array
by merlyn (Sage) on Feb 28, 2002 at 17:32 UTC
Re: Re: •Re: Re: Removing blank lines from array
by rjray (Chaplain) on Feb 28, 2002 at 23:56 UTC

    @info will still be visible after the chomp(). There is no enclosing scope there to cause the lexical nature to release the array.

    --rjray