Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
RE: Regarding styleby AgentM (Curate) |
on Oct 24, 2000 at 23:21 UTC ( [id://38179]=note: print w/replies, xml ) | Need Help?? |
Actually, the ampersand is less of a shortcut and more "a feature of perl 4". Its requirement in some situations is easily gotten around by predeclaring your subs.
I'm not advocating or attacking its use, just commenting on what eventually became of it (according to the perldocs).
I don't think anyone uses m// anymore. i imagine that some people don't even know what it is! Languages evolve and perl is a language. Since m// is arguably the most used regex function, I don't disagree that it's use is optional. The "diamond operator" is used to save five keystrokes. Whether this is good or evil is irrelevant. use whichever is more obvious in context to you. A well-weathered JAPH will link them in his head instantaneously. No problem. I think there are many more such "shortcuts", such as cutting down on parentheses in functions. Also, I jokingly consider all of the awk-inherited variables to be very nice shortcuts that I enjoy alot. Thanx awk! Also, another great shortcut can be found under this link.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
In Section
Meditations
|
|