"John W. Krahn" wrote:
> 
> #!/usr/bin/perl -w
> use strict;
> 
> # Get the mtime from two files
> my $date1 = (stat $file)[9];
> my $date2 = (stat 'zzp2.txt')[9];
> 
> print scalar $date1, '   ', scalar $date2, "\n";

Sorry, I was typing too fast.  This line should be:

print scalar localtime($date1), '   ', scalar localtime($date2), "\n";


> if ( $date1 < $date2 ) {
>     print "$file is older than zzp2.txt.\n";
>     }
> elsif ( $date2 < $date1 ) {
>     print "zzp2.txt is older than $file.\n";
>     }
> else {
>     print "the two dates are identical.\n";
>     }
> 
> __END__



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to