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'; #### my $command1 = ; chomp($command1); my ($command2, $command3) = ('default', 'hoo hah'); unless (eof(STDIN)) { $command2 = ; chomp $command2; unless (eof(STDIN)) { $command3 = ; chomp $command3; } }