Gladstone Daniel - dglads wrote: > I have a text file that can be anywhere from 40,000 lines to 120,000 > Lines, > > I want it to split the file so that no file is larger then 20,000 lines > > 1) run a line count > 2) split the file into pieces
perl -pe'($.-1)%20_000 or open STDOUT,">",$ARGV.++$a or die$!' yourfile John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/