Problems? Is your data what you think it is? | |
PerlMonks |
Re: Split files into chunks of $n linesby kirbyk (Friar) |
on Sep 27, 2005 at 15:56 UTC ( [id://495425]=note: print w/replies, xml ) | Need Help?? |
If you're in unix, use the 'split' command. I think the syntax would be 'split -l 4000 filename', and it will do exactly what you want. (See man split for more detail.)
It's not tremendously hard to do it through perl, and if you want to modify anything that'd be useful. I'm sure someone will post code for that very soon. There's more than one way to do it! -- Kirby, WhitePages.com
In Section
Seekers of Perl Wisdom
|
|