in reply to Re^2: Bad name after noimport error
in thread Bad name after noimport error

The switch worked before I added <some code which could not possibly affect the switch statement>.

This wonderful and mysterious feature of the Switch module is the reason it is so warmly deprecated. It arises from the fact that the module is a source filter.

What else could I use?

For an equivalent in 5.10+ versions, see the  given and  when keywords discussed in the section Switch statements of perlsyn.
Prior to 5.10, see the section entitled something like "Basic BLOCKs and Switch Statements" in perlsyn for alternatives.

Replies are listed 'Best First'.
Re^4: Bad name after noimport error
by burningredmoon (Novice) on Apr 23, 2011 at 00:37 UTC
    Thank you for the reply. I got help from my class mates and I'll post the new code.