in reply to (jeffa) Re: Pattern Matching
in thread Pattern Matching

$report =~ tr/-_.//d; # underscores, dashes, and periods
I would yellow-flag that in a code review, since the comment does not precisely match the action, and needlessly. Some maintenance programmer is going to wonder "Why does he call a dash an underscore?".

I might also add a comment to explain why it's not

tr/_-.//d
which would invoke the range-ness of the dash. Or maybe I'd change it to:
tr/\-_.//d
to make it clear that the dash doesn't have its dashing nature.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.