1999-04-22_weather.log.gz 1999-04-24_weather.log.gz 1999-04-25_weather.log.gz 1999-04-27_weather.log.gz You get the idea. Now suppose I want to see if files for a particular date range are available: my attempt at code is: ($nyear,$sdate,$edate) = @ARGV; ($sday,$smon) = split('-',$sdate); ($eday,$emon) = split('-',$edate); $sdate_cursor = [$nyear,$smon,$sday-1]; $edate_cursor = [$nyear,$emon,$eday]; @list = `ls -1 *_weather.*`; foreach $file (@list) { chomp($file); ($date,$dummy) = split(/\_/,$file); ($year,$month,$day) = split('-',$date); last if (compare_dates([$year,$month,$day], $edate_cursor) > 0); if (compare_dates([$year,$month,$day], $sdate_cursor) > 0 ) { push (@array, $file) if -e $file; } } sub compare_dates { my($a, $b) = @_; foreach (0..2) { if ($$a[$_]>$$b[$_]) { return 1; } elsif ($$a[$_]<$$b[$_]) { return -1; } } return 0; } As you can see from the list of files above, the files for the 23rd and 26th of April is missing. What could I do to get the script to report that these files are not present????? Thanks in advance. Stacy