#!/usr/bin/perl -w open(CSV, "/tmp/doctime.txt"); #contains comma seperated path,filename,olddate @title = ; # I know this is lame but it works and I understand it for ($i = 0; $i < scalar(@title); $i++) { # some of you dont like this but it works fine ($dironly[$i], $filename[$i], $date[$i]) = split(",", $title[$i]); } for ($a = 0; $a < scalar(@filename); $a++) { $access= $date[$a]; $file = $filename[$a]; $dir = $dironly[$a]; chdir("$dir"); print "$dir $file $access\n"; #use this for a log print utime ($access, $access, "$file"), "\n"; }