Help for this page

Select Code to Download


  1. or download this
    my ($command1, $command2, $command3) = @ARGV;
    $command2 = 'default' unless defined $command2;
    ...
    my $command1 = shift or die; # Ideally call a subroutine to print usag
    +e and die
    my $command2 = shift || 'default';
    my $command3 = shift || 'hoo hah';
    
  2. or download this
    my $command1 = <STDIN>; chomp($command1);
    my ($command2, $command3) = ('default', 'hoo hah');
    ...
            $command3 = <STDIN>; chomp $command3;
        }
    }