granted, this is a module that isn't standard in Perl, as opposed to stat(), so you need to do the MakeMaker waltz, but I think it is worth going the extra mile for the much clearer code.
In many cases, scripts have to run on multiple platforms, with different versions of perl/mod_perl. In those situations, it's painful to have to build File::Stat just so someone doesn't have to see my $size=(stat $file)[7], which is pretty clear anyhow if you assign it to an appropriately named variable.
If you KNOW all the platforms have 5.8.0 or better available, you could use File::stat, but I'm not sure that's that big a win either over just plain stat. I guess I just prefer the builtin in this case.
--
Mike
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.