Just to firm up my understanding:Does this code mean that unless an arguement is found in the command line it will run subroutine sub1 by default?unless ( @ARGV ) { exit sub1();
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.
In reply to Re^3: Using Getopt::Long to call subroutines
by blazar
in thread Using Getopt::Long to call subroutines
by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |