Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-09-30 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (385 votes), past polls