foreach $x(@x) { open ($x, ">>$log") or die ; print while (<$x>); printf "%7d",$x; } close ($x);