Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Setting Global Variable in Sub

by stephen (Priest)
on Apr 30, 2002 at 16:17 UTC ( #163112=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $name = 'Jean ValJean';
    my $number = 24601;
    ...
      undef $name;
    }
      
    
  2. or download this
    sub who_am_i {
      my $name = 'Jean ValJean';
    ...
    # these are different variables, but could
    # have chosen $name and $number again
    my ($prisoner_name, $prisoner_number) = who_am_i();
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-07-05 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls