gctaylor1 has asked for the wisdom of the Perl Monks concerning the following question:
My current script looks something like this:
but I want to add things like example 4, and maybe 5 :if ($ARGV[0] eq "-H"){ print "Help goes here\n"; } elsif ( $ARGV[0] eq "-L") { print "List of things here\n"; } elsif ( $ARGV[0] eq "-Action") { my $parameter1 = $ARGV[1]; my $parameter2 = $ARGV[2]; print "Rest of program here\n";}
I have 3 ideas:
Thank-you for any insight.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What's the best way to make my script execute different sections without using goto?
by ikegami (Patriarch) on Feb 24, 2009 at 17:32 UTC | |
Re: What's the best way to make my script execute different sections without using goto?
by revdiablo (Prior) on Feb 24, 2009 at 21:03 UTC | |
by gctaylor1 (Hermit) on Feb 25, 2009 at 00:48 UTC | |
by Anonymous Monk on Feb 25, 2009 at 10:31 UTC |