Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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
•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 chilling in the Monastery: (7)
As of 2014-12-20 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls