Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^9: Capturing regex from map

by Anonymous Monk
on Sep 16, 2013 at 06:06 UTC ( [id://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.)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-20 17:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found