in reply to Re^2: How to Modify Each file??
in thread How to Modify Each file??

something very rough with some details left out
opendir THISDIR, 'whatever/thisdir'; my @files = readdir(THISDIR); foreach my $x (@FILES){ open READFILE, "whatever/thisdir/$x"; open WRITEFILE, ">whatever/thatdir/$x"; while(<READFILE>){ chomp; my @parts = split(/\s/, $_); print WRITEFILE $parts[1], " ", $parts[0], "\n"; } close WRITEFILE; close READFILE; }