Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Running perl functions from a command line

by hardburn (Abbot)
on Jan 28, 2003 at 14:55 UTC ( #230600=note: print w/ replies, xml ) Need Help??


in reply to Running perl functions from a command line

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


Comment on Re: Running perl functions from a command line
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://230600]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2015-07-05 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls