foreach my $f (@state2) { print "File is $f\n"; # swap this with cvs co command `cvs co $f`; }