Help for this page

Select Code to Download


  1. or download this
    my $op = shift @ARGV;
    # first element of @ARGV now in $op and removed from @ARGV.
    ...
    print multiply(@ARGV) . "\n"  if $op eq 'multiply';
    # subs as before
    
  2. or download this
    my $op = shift @ARGV;
    # first element of ARGV in $op and removed from @ARGV.
    ...
    print $h{$op}->(@ARGV) . "\n";
    
    # subs as before