IT'S A TRAP!
You're more likely to run into this:
If you have a file name of 0
, your program will stop and not continue processing files.
A more appropriate loop looks like this:
- while ( defined( my $file = readdir(DIR) ) ) {
Perl does not support sparse arrays. The closest thing is a hash.
If you're like me, you either installed the module for a specific need, or you had it installed as part of your OS.
Did you know there's a seperate dependency, called DateTime::TimeZone, that is a dump of time zone data?
Update your DateTime::TimeZone
today!
Don't depend on for millisecond (or smaller) calculations.
Some systems have a that can only go to hundredths of a second, even in this day and age - a recent installation of Red Hat Enterprise Linux 4 on an AMD 64 platform provided only that level of granularity.
Submit a PR to github.com/petdance/perl101