in reply to Re: Re: The Y2.001775K Bug
in thread The Y2.001775K Bug

Here's a possible way that you can run into this blunder, a good possible 'newbish' problem.
# Generate files... my $time = time(); open FILE ">$time.txt" or die $!; print FILE $stuff; close FILE; # this is repeated often, as from CGI... # # Retrieval now... my @files = get_list_of_files(); @files = sort { $a cmb $b } @files; foreach my $file ( @files ) { do_something_with_file ( $file ); }
If the files are created across the 9/9/01 boundary, you are going to missort these later.

Oddly enough, I use this exact technique in my recent code snippet, notepad.pl; however, I do protect from this by sprintf'ing the time into a much much longer string that should be ok until 64-bit systems...without that sprintf, that code suffers from the same problem.

}


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain