http://www.perlmonks.org?node_id=1023251


in reply to Check For null Arguments

Further to ramlight's post: One could also write something like this very early in the code:
    die "no command line arguments given" unless @ARGV;