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.
In reply to Re: Switch - "case" may clash with future reserved word
by ikegami
in thread Switch - "case" may clash with future reserved word
by ahoffmann
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |