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';