in reply to replacing text in multiple files
With that sort of usage, you don't need to worry about opening or closing files in your code; just read, do stuff, and print:cat *.log | your_script > modified.log-data
#!/usr/bin/perl use strict; while (<>) { # do stuff here, then... print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: replacing text in multiple files
by Eliya (Vicar) on Apr 14, 2012 at 04:43 UTC |