Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Perl itself can never "recognise the -u as a switch". Getopt::Std might, but @ARGV is where all command line arguments are held. Without a SSCCE (http://sscce.org) it's hard to tell, but your assignment to $miscreants and $reason is position sensitive (they are the first two command line arguments) while the Getopt family (AFAIK) is insensitive, not caring whether the -u 1.2.3.4 is first, last or somewhere in the middle. You are therefore using a mixture and may very well find some things work because of the order of arguments in the invocation. Try moving everything to positional or Getopt-friendly format and you may find your problems easier to solve, even if they don't go away. I also recommend looking at The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan!. Both modules are core. Regards, John Davies In reply to Re: switch being ignored put into ARGV
by davies
|
|