Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Global variable vs passing variable from sub to sub

by gmpassos (Priest)
on Sep 14, 2004 at 05:24 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://390746]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found