in reply to split mailbox one-liner
Not that we're golfing, but a "-n" loop that ends in "print" seems odd. {grin}
I've used something like:
before, with the advantage that the original pre-first-From output ends up in a file that is not part of the series.perl -pe 'open STDOUT, ">out".++$n if /^From /' <in >before-first-outp +ut
In Section
Cool Uses for Perl