Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: foreach-loop-local var in sub

by blue_cowdawg (Monsignor)
on Jan 21, 2013 at 15:55 UTC ( #1014474=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach (0, 1) {
        my $i = $_;
    ...
    
        my_print( $i);
    }
    
  2. or download this
    use strict;
    use warnings;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-08-25 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (352 votes). Check out past polls.