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

Re: Global variable vs passing variable from sub to sub

by gmpassos (Priest)
on Sep 14, 2004 at 05:24 UTC ( #390746=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub test1 {
      ++$_[0] ;
    ...
    my $n = 10 ;
    test1($n) ;
    print "N: $n\n" ;
    
  2. or download this
    T1 [11]
    T2 [12]
    T3 [13]
    end
    N: 13
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://390746]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2016-12-04 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (69 votes). Check out past polls.