in reply to Splitting long file
Hmmm. I'm sure I can work a ... in somehow:
open BIGFILE, $filename or die; while (<BIGFILE>) { if (/(.+)$/ ... /^\$$/ && next) { if (defined $1) { open SMALLFILE, ">$1" or die; next } print SMALLFILE; next; } warn "Untested code is bad!"; } close BIGFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Splitting long file
by matija (Priest) on Apr 08, 2004 at 10:25 UTC | |
by TilRMan (Friar) on Apr 08, 2004 at 10:47 UTC | |
by Micz (Beadle) on Apr 08, 2004 at 11:32 UTC |