Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to extent the scope of local variable outside block??

by moritz (Cardinal)
on May 13, 2015 at 13:06 UTC ( #1126547=note: print w/replies, xml ) Need Help??


in reply to How to extent the scope of local variable outside block??

Declare the variable outside the foreach loop, then you can access it it outside the loop.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2020-05-26 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?