in reply to loop da loop chomp chomp loop chomp blurp oops

I believe this can also be done on *nix with the split command.
split -1 /path/to/input_file.txt subfile

Replies are listed 'Best First'.
Re^2: loop da loop chomp chomp loop chomp blurp oops
by igelkott (Priest) on Feb 02, 2008 at 20:41 UTC
    A small change gives the requested numerical file names:
        split -d1a 4 /path/to/input_file.txt subfile
    Still not exactly as specified since the names will be zero-padded but it keeps them sorting alphanumerically ... and that's probably better anyway.

    OK, this ain't Perl but a one-liner is a one-liner.