First thing to do would be to ditch the Switch.
This is a deprecated module in production code, and only served to examine and explore what a real switch construct would look like. This lay the groundwork for the switch statement in Perl 6, which in turn was backported to Perl 5 in the 5.10.0 release (via a feature pragma). The Switch module is implemented via a source filter, and is the cause of many strange action-at-a-distance errors.
Your handling of @ARGV would be handled in a more orthodox manner with Getopt::Std or Getopt::Long. Doing so just might make your problem go away.
• another intruder with the mooring in the heart of the Perl
In reply to Re: foreach problem
by grinder
in thread foreach problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |