That's one way to do it, if your sub is simple. Otherwise, you'll have to work with code references. The value given to --quiet will be passed to your sub via @_GetOptions('quiet' => sub{ launch_on_quiet(@_) } ); sub launch_on_quiet { # Stuff do do when --quiet is passed }
Anima Legato
.oO all things connect through the motion of the mind
In reply to Re: Getopt::Long subroutine usage
by legato
in thread Getopt::Long subroutine usage
by rockneybot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |