# handle the no-args case: unless ( @ARGV ) { exit sub1(); } GetOptions( one => \&sub1, two => \&sub2, three => \&sub3, );