Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Default subroutine parameters

by jeffenstein (Hermit)
on Apr 23, 2002 at 09:55 UTC ( [id://161249]=note: print w/replies, xml ) Need Help??


in reply to Default subroutine parameters

For subroutines with more than one argument:

sub mysub { return unless( (@_ % 2) == 0); my %args = ( host => 'localhost', port => 25, @_); # print "Args: host = $args{'host'}, port = $args{'port'}\n"; 1; } mysub( host => 'gatekeeper.dec.com', port => 80) or die "Mysub failed";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found