#!perl -w ############################################################################### # File copier logger ############################################################################## use strict; use Time::localtime; use File::Copy; $copyLog = "perlCopy.log"; $now = ctime(); open(COPYLOG, ">> $copyLog") or die "can't open the log file"; $count=1; while ($count < 28) { $count+=1; $fileCopy = "lab-as-h06-vm$count.dsk"; if($count < 10) { $fileCopy = "lab-as-h06-vm0$count.dsk"; } copy("lab-as-h06-vm01.dsk","$fileCopy"); print COPYLOG "$fileCopy copy started at $now \n"; }