Divakar has asked for the wisdom of the Perl Monks concerning the following question:
use Getopt::Long; my $name="divakar"; my $age="24"; my $option=GetOptions("name"=>\$name,"age"=>\$age); print "the options are $option\n"; if ($option) { print "the option given is divakar\n"; } if ($option) { print "the option given is 24"; }
i want to try the getopt module. when i click the run button in eclipse. it returns following output.
the options are 1 the option given is divakar the option given is 24
How do i run my script in eclipse ide by giving options. e.g., getopt.pl --age
i dont want to get the output as above after clicking the run button
Thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to execute perl script with options using Eclipse IDE?
by Eliya (Vicar) on Nov 20, 2011 at 12:27 UTC | |
by Divakar (Sexton) on Nov 29, 2011 at 10:07 UTC | |
by Eliya (Vicar) on Nov 29, 2011 at 10:26 UTC |