in reply to Perl Switch Errors on certain version
Take a look at perldoc Switch, it says 'Due to the heuristic nature of Switch.pm's source parsing, the presence of regexes specified with raw "?...?" delimiters may cause mysterious errors. The workaround is to use "m?...?" instead.', You have a few of these matches in your code, for example
elsif($new =~ /9/){$action = "Reject";if($debug){&writelog(3,"DEBUG: A +ction=$action");}}
, I'd suggest you stick an "m" in front of that match and see whether that fixes the error.
In general, read the caveats at the end of the perldoc carefully, Switch suffers from problems inherent in source filters, I would not use it in production code (and the original author does not recommend doing so either).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl Switch Errors on certain version
by Perl Mouse (Chaplain) on Nov 29, 2005 at 11:13 UTC | |
by tirwhan (Abbot) on Nov 29, 2005 at 11:49 UTC | |
by Perl Mouse (Chaplain) on Nov 29, 2005 at 11:58 UTC | |
by tirwhan (Abbot) on Nov 29, 2005 at 13:29 UTC |