in reply to Would you use a switch instead?

I'd leave it as is. Even if I would not have written it that way (I'd leave off the parens, and if I wanted to localize $_, I'd use a do {} block), I don't see the benefit of putting resources in changing it.

Replies are listed 'Best First'.
Re^2: Would you use a switch instead?
by Anonymous Monk on Jul 04, 2009 at 13:39 UTC
    Can you please show me how you would use a do{} block instead of local?
      my $foo = do { local $_ = $value; /aaa/ ? 'wanna' : /bbb/ ? 'be' : /ccc/ ? 'startin' : 'somethin' };
        Sweet. I like that. Thanks.