Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 taking refuge in the Monastery: (6)
As of 2015-08-31 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (363 votes), past polls