A couple weeks ago I corrected quite a few of these Perl "localtime()" bugs. Grabbing localtime (or gmtime) in a scalar context works OK, but when you dump the results into an array, the year comes up as an integer = thisyear - 1900.
Plenty of Perl programmers abused the language's ability to treat integers and strings as the same and just did $year = '19' . $year. Wrong! Correct fix is $year += 1900.
Even the mighty Lincoln Stein, author of the venerable CGI.pm, was susceptible. Old versions of CGI.pm simply used the raw year (i.e., 100 on 1/1/2000) in setting a cookie expire time. But Lincoln, bless him, caught the error way in advance of Y2K and corrected it a couple of releases ago. He employed the correct fix: $year += 1900.
The poll's driven by legacy code, sure. That's a lagging indicator. If they want a leading indicator, look at programming language book sales.
The fact is, C/C++ is used quite a bit in large corporations. VB is a very accessible, easy to learn language and that's why you see it so much in corporate America. But I work for a quite large Internet ecommerce site, and Java has exploded in use here in the last 4 months. Most of our legacy code is C/C++ and Perl, but almost all new development is in Java. We may eventually rewrite the C/Perl stuff, or we may just use it till it dies.
Plenty of Perl programmers abused the language's ability to treat integers and strings as the same and just did $year = '19' . $year. Wrong! Correct fix is $year += 1900.
Even the mighty Lincoln Stein, author of the venerable CGI.pm, was susceptible. Old versions of CGI.pm simply used the raw year (i.e., 100 on 1/1/2000) in setting a cookie expire time. But Lincoln, bless him, caught the error way in advance of Y2K and corrected it a couple of releases ago. He employed the correct fix: $year += 1900.
The fact is, C/C++ is used quite a bit in large corporations. VB is a very accessible, easy to learn language and that's why you see it so much in corporate America. But I work for a quite large Internet ecommerce site, and Java has exploded in use here in the last 4 months. Most of our legacy code is C/C++ and Perl, but almost all new development is in Java. We may eventually rewrite the C/Perl stuff, or we may just use it till it dies.