Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Subroutine args by-value vs. by-ref

by wog (Curate)
on Aug 24, 2002 at 06:02 UTC ( [id://192525]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub x {
      $_[0] = "in x";
    }
    my $foo = "outside";
    x($foo);
    
  2. or download this
    sub x {
      my($foo) = @_;
    ...
    }
    my $foo = "outside";
    x($foo);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-19 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found