in reply to Need Help in Understanding Some Code - Map and Scalar Questions
Worth mentioning: this isn't exactly the kind of code I'd write for anything but fun. It's a bit too terse/idiomatic. It is nice to be able to do a lot in a small space, especially for this kind of prototype, but for code you expect to live awhile or you want to share or test easily it's much better to abstract that kind of stuff (argument parsing and dispatch) into another space so it can be semantic in usage and easy to follow in the pertinent source code.
So, it's not surprising this was confusing. The idioms ikegami explained are pretty common and worth knowing and understanding regardless. Also of interest: site:perlmonks.org Schwartzian Transform.
|
---|