I need help with problem... i need to create a program that have two subroutines add() and multiply() that will add or multiply its arguments and print the result in screen. this is my current code: if ($ARGV[0] =~ /add/) { $rtn = add($ARGV[1]); print "The sum is: $rtn"; } elsif ($ARGV[0] =~ /multiply/) { $rtn = multiply($ARGV[1]); print "The product is: $rtn"; } sub add { } sub multiply { } can anybody fill me in this code..im kinda confused.. thanks for your help guys..
In reply to subroutines problem by newly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |