Just another Perl shrine | |
PerlMonks |
Re: Extract lines and output...by cjensen (Sexton) |
on Oct 10, 2001 at 01:45 UTC ( [id://117881]=note: print w/replies, xml ) | Need Help?? |
I usually use the unix command-line for stuff like this: head -4 *.txt | \ perl -pe '/==>\s(.*)\s<==/ ? ($f, $_) = ($1, undef) : $_ = "$f: $_";' \ >> output_filename
In Section
Seekers of Perl Wisdom
|
|