if ( @ARGV ) { do_something( shift ); } elsif ( -M $file > 7 ) { do_something_else(); } else { warn "Nothing to do ($file is recent, and you gave no arg to work on)\n"; warn "Usage: $0 [optional_arg_that_does_what_exactly]\n"; } # default exit status will be "0" (success)