You need to parse the command line options (see Getopt::Long) and then run the functions based on that. For instance:
use strict; use Getopt::Long; my $a_opt; my $options = GetOptions('a' => $a_opt); if($a_opt) { Foo1(); Foo2(); Foo3(); } # Rest of program here
In reply to Re: Running perl functions from a command line
by hardburn
in thread Running perl functions from a command line
by wizard341
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |