bichonfrise74 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use Getopt::Std; getopts('xp', \%opt); $arg_1 = $opt{'x'} if (defined($opt{'x'})); $arg_2 = $opt{'p'} if (defined($opt{'p'})); sub test_a { print "argument is from $arg_1\n"; } sub test_b { print "argument is from $arg_2\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to do Unit Testing on a Script
by GrandFather (Saint) on Oct 02, 2008 at 03:22 UTC | |
by bichonfrise74 (Vicar) on Oct 02, 2008 at 17:29 UTC | |
|
Re: How to do Unit Testing on a Script
by andreas1234567 (Vicar) on Oct 02, 2008 at 07:36 UTC | |
|
Re: How to do Unit Testing on a Script
by repellent (Priest) on Oct 02, 2008 at 18:57 UTC |