in reply to
Getopt in perl
But why the $iPid will be 1 always when I run the perl script
Because
getopts('f:p');
means p is a boolean flag, and f takes an argument.
Comment on
Re: Getopt in perl
Download
Code
In Section
Seekers of Perl Wisdom