The
The St. Larry Wall Shrine pointed me to Larry's very interesting article
Natural Language Principles in Perl which talks about "Local Ambiguity" (search for it). In natural languages you can construct sentences where it's very hard to figure out who the pronouns refer to, and if you (as the listener) get it wrong it may disastrously alter the meaning of the sentence. That's just a side effect have having a powerfull language where it's easy to say things because you can say them economically. Larry said it better:
You learn a natural language once and use it many times. The lesson for a language designer is that a language should be optimized for expressive power rather than for ease of learning. It's easy to learn to drive a golf cart, but it's hard to express yourself in one.
Like the previous poster I tend to use an explicit variable for complicated foreach loops because I don't like to use $_ explicitly in function calls or other places far from the source of implicit variable. However, I love it when I can say:
last if /somregexp/;
instead of
last if $somelongvarname =~ /somregexp/;
not to mention just plain old
chop;
-I went outside... and then I came back in!!!!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.