in reply to Re: Re: Splitting long file
in thread Splitting long file

Too right! That oughta learn me.

Rereading, I now see the approach of the OP. Perhaps (again untested):

$/ = "\$\n"; open BIGFILE, yada yada or die; while (<BIGFILE>) { my ($filename, $guts) = split /\n/, $_, 2; open SMALLFILE, ">$filename" or die; print SMALLFILE $guts; close SMALLFILE; } close BIGFILE;
or even
use File::Slurp qw( write_file ); $/ = "\$\n"; open BIGFILE, yada yada; while (<BIGFILE>) { write_file(split /\n/, $_, 2); }