Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Tutorial on arguments for the new

by PockMonk (Beadle)
on Dec 11, 2006 at 21:21 UTC ( [id://589157]=note: print w/replies, xml ) Need Help??


in reply to Re: Tutorial on arguments for the new
in thread Tutorial on arguments for the new

I think he was just trying to explain for others starting out what arguments were and how they were passed to subroutines, I don't think the exact code matters all that much. Even clearer might be:
my ($bar, $baz) = ("Hello ", "World"); foo($bar, $baz); # ... sub foo{ print "$_[0]"; #prints "Hello " print "$_[1]"; #prints "World"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2024-04-18 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found