2007/10/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Hi > I would like to compare two files by comparing the files dates. > If one file shows > ls -la May 12 2003 filename > and the other name shows the same date they are OK for me (I'm not > interested in the time part only the date of the file) > But if the dates are not the same I would like to copy one of the > files. > How do I do this in Perl?
Hi, if ( int(-M "file1.txt") != int(-M "file2.txt") ) { # copy the file } for copying files,you can use the module File::Copy from CPAN, http://search.cpan.org/~nwclark/perl-5.8.8/lib/File/Copy.pm -- Jeff Pang - [EMAIL PROTECTED] http://www.rwweb.co.cc -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/