$c = qx{/usr/bin/clear}; for my $file (@list){ # Do whatever testing you want here print "${c}Testing file: $file\nPassed: $p\nFailed: $f\n" }