foreach my $file (@files) { open(FILE, $file) or die "Nya, nya: $!\n"; while(my $line = ) { # We often use | delimiters.... my @fields = split(/|/, $line); # Do something nifty with the fields... print OUTPUT join("|", @fields); } }