next up previous
Next: 6. What Perl looks Up: 5. Perl myths Previous: 5. Perl has no

6. Perl has Y2k problems

Perl's time functions return a year in the format of the actual year minus 1900 years. While this results in a two-digit year for the 20th century, years from 2000 onwards will be correctly returned as 100 and upwards. Hence all date comparisons will work seamlessly.

While it is possible for Perl programmers to write non-Y2k compliant programs by outputting dates in two-column format where they may be misinterpreted by the human reader, or by converting 2-digit 20th century dates to 4-digit ones by prepending the string ``19'' instead of arithmetically adding 1900, this is certainly not a recommended practice and the Perl documentation specifically warns against it.

Kirrily Robert