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]).