cat *.log | your_script > modified.log-data #### #!/usr/bin/perl use strict; while (<>) { # do stuff here, then... print; }