my $foo_arg = $ARGV[0]; # or just shift(); unless ($foo_arg) { print "Foo arg is missing! Please enter:\n"; $foo_arg = ; chomp($foo_arg); die "Alright, i'm just quitting this one!" unless $foo_arg; }