Second question.
Why was that the case?
Why did you have to put the parentheses in? Or why did that make you sad?
If it made you sad because you felt there should be a way of writing it without parentheses, then your instincts are sound.
The trouble, as theDamian explains in Perl Best Practices, "Mapping and Grepping", is that
when the first argument to a map or grep is specified as an expression, it becomes harder to distinguish from the remaining arguments.
His recommendation is to say
map BLOCK LIST
which in your case would be
my @small_files = grep { -s < 10000 } @ARGV;
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.