Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: •Re: Re: Removing blank lines from array

by PrakashK (Pilgrim)
on Feb 28, 2002 at 17:26 UTC ( #148296=note: print w/ replies, xml ) Need Help??


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


Comment on Re: •Re: Re: Removing blank lines from array
Download Code
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://148296]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-30 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls