most people agree this is a DWIM violation: this is an area where Larry blew itIt may not be a DWIM for you, but it's a DWLM (do what Larry means), and that's the only meaning that matters. In fact, I don't think it would look right for it to return the changed string. I like that I can use it as:
So, it certainly DWIMs for me. Apparently, I'm not one of "most" in your sentence. However, a lot of people have learned from my books, so I suspect the number who understand it the the way I do would be a large portion of your minority.if (s/foo/bar/) { # yes, I replaced foo with bar ... }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: A hint about using map
by merlyn
in thread Turning foreach into map?
by ghenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |