in reply to Re^2: Using Getopt::Long to call subroutines
in thread Using Getopt::Long to call subroutines

Just to firm up my understanding:
unless ( @ARGV ) { exit sub1();
Does this code mean that unless an arguement is found in the command line it will run subroutine sub1 by default?

Yes, and as per exit's documentation, it will exit from your program with the value returned by sub1 (unless of course you exit earlier from within sub1) which may be what you want or not depending on what it actually does.