Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^9: Capturing regex from map

by Anonymous Monk
on Sep 16, 2013 at 06:06 UTC ( #1054228=note: print w/ replies, xml ) Need Help??


in reply to Re^8: Capturing regex from map
in thread Capturing regex from map

I'm saying that it can, for the OP's case, be trivially made easier to understand. It did take me a few minutes' head-scratching to see what it did, and it surprised me that the community's response about its clarity was positive.

In my case, I don't use the list-returning properties of regexps often, nor do I expect map to subtract from or add to the amount of elements in the array. If I need to kill elements, I generally leave a hint such as () inside the map block.

I do not view this behaviour as dumbing down code at all, but just saving people's heads from excess scratching, that they are able to instantly see what that line does. The Perl community does have a reputation of abstruse write-only code, you know, and I think this line would be a perfect example of excess terseness the community is infamous for. (For the record, I hate Java for its dumb verbosity. Middle grounds exist, too.)


Comment on Re^9: Capturing regex from map
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-07-28 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (203 votes), past polls