Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: subroutines problem

by mrborisguy (Hermit)
on Jul 20, 2005 at 01:01 UTC ( [id://476318]=note: print w/replies, xml ) Need Help??


in reply to subroutines problem

Just a question to clarify: How are you adding just one argument? I mean, your code seems to be implying that you'll be doing something like add( 5 ); - that is if $ARGV[1] contains 5. That just doesn't seem to make sense, most of the time adding takes two parameters, like add( 5, 2 ), I can reasonably guess what that will do, but not add( 5 ).

    -Bryan

Replies are listed 'Best First'.
Re^2: subroutines problem
by newly (Initiate) on Jul 20, 2005 at 01:22 UTC
    yes Brayan your right, the script would be called with 2 arguments, similar to... add 3 5 which will pass the 'add' argument ($ARGV[0]) and the '3' and '5' arguments ($ARGV[1] and $ARGV[2]).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found