Try this
#!/usr/bin/perl use strict; use warnings; use Getopt::Long; my $name; my $mobile; GetOptions ("name=s" => \$name,"mobile=s" =>\$mobile); print "$name\n$mobile\n";
I sorted it out by using search to find this node: Examples for using Getopt::Long and poking about a bit. I cut out some of your parameters for convenience.
In reply to Re: how to use getOptions()
by bitingduck
in thread how to use getOptions()
by prjain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |