in reply to Switch - "case" may clash with future reserved word
That's exactly the message I get when I don't use use Switch; Switch doesn't detect your code as being a switch statement, probably due to something elsewhere in the program. Source filters are fragile.
Remove bits of the program until perl -c script.pl no longer gives the error. The last bit of code you removed likely contains the code Switch has a problem with.
I know that some functions of Text::Balanced (used by many source filters including Switch) have problems with //, although I don't know if it'll result in this problem, though. split(//, $var, -1) can be replaced with $var =~ /(.)/sg.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Switch - "case" may clash with future reserved word
by Fletch (Bishop) on Nov 28, 2007 at 21:59 UTC |