![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re: Re: Re: Reading in data that isby dragonchild (Archbishop) |
on Oct 10, 2001 at 20:58 UTC ( #118048=note: print w/replies, xml ) | Need Help?? |
*laughs* You know, I've never once used tr in a script that didn't involve cut'n'paste from someone else. TMTOWTDI at its best (worst?)! Yes, tr is faster in this specific instance. No, I'll probably never use it because I very rarely (if ever!) do straight character substitutions. If I'm stripping out characters, I'm doing that as part of a series of substitutions, usually involving s/\s//g and not some specific character(s).
If you can read either, use the faster one. But, please note that speed of execution is not Perl's strong suit. It's good at that, but speed of development is why most people use Perl. In that vein, s/"//g is just as good. ------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
In Section
Seekers of Perl Wisdom
|
|