good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
tr/M// is sufficient Indeed it is ... as any golfer would know. :) Speaking of which, note that y is an oddball synonym for tr -- added, not for golfers (because code golf didn't exist back then), but to entice diehard sed devotees to the new frontier of Perl. I have to give a further honourable mention to y///c -- aka Abigail's length horror -- because it's one character shorter than the prosaic length. Finally, note that Perl's flexibility of being able to choose your own delimiter has made tr a favourite of obfuscators (and bored golfers) ... as I remember from this amusing expression: employed in a (non-winning) entry in the pioneering Get Even golf game of 2002. In reply to Re^5: Pattern matching regex problem (Abigail's Length Horror)
by eyepopslikeamosquito
|
|