>>>>> "TE" == Tony Esposito <[email protected]> writes:
TE> You miss my point but thanks for the syntax check. I am concerned TE> with comparing the functionality, one versus the other. they are not comparable at all. tr/// works on individual characters and nothing else. s/// works with regexes which can modify strings as a whole. there are a few simple cases where one can do the same as the other such as replacing a single char with another globally. and in that case tr/// wins for speed and better specifity. the reason people conflate the two is becaus they share the =~ binding op. i have seen op tables in web tutorials that incorrectly list tr/// as a regex op. so think tr/// for chars and only chars and s/// for regexes and strings. simple. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
