foreach $file (@files) { print "$file\n"; #just to make sure this looks right }