in reply to switch, transliteration ( tr/// ) of $_ issue

In Categorized Damian Modules, the author of Switch recommends against using it. It's a source filter, and it sometimes is confused by the code it's filtering. If you step through your script in the debugger, it might tell you what's going on.

  • Comment on Re: switch, transliteration ( tr/// ) of $_ issue

Replies are listed 'Best First'.
Re^2: switch, transliteration ( tr/// ) of $_ issue
by moritz (Cardinal) on Nov 18, 2008 at 16:25 UTC
    One should mention that newer versions of Perl do have a sane alternative, that's
    use 5.010; given ($foo) { when ($condition) { code } ... }

    (described in perlsyn)