> On Wednesday, June 11, 2003, at 05:14 AM, Jaschar Otto wrote: > > >> $string =~ s/[^abcd]//g; > > > > Thanks a lot, that worked perfect, > > Transliterate is probably a better choice for this kind of > thing. It's > certainly more efficient. You would use it like this:
Just curious, how is it more efficient? Can you use anchors in tr ? because in the =~ example above it would match a string: abcd foo monkey But not monkey abcd foo While the tr version would match both. Just wondering Dan > > $string =~ tr/abcd/ /c; > > James > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]