my ($command1, $command2, $command3) = @ARGV; $command2 = 'default' unless defined $command2; $command3 = 'hoo hah' unless defined $command3; # OR my $command1 = shift or die; # Ideally call a subroutine to print usage and die my $command2 = shift || 'default'; my $command3 = shift || 'hoo hah';