Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: split of filesby Moron (Curate) |
on Jun 22, 2007 at 09:53 UTC ( [id://622761]=note: print w/replies, xml ) | Need Help?? |
if you mean do file split like unix split does but on pattern-matched boundaries instead of byte counts - I rather imagine something like:
(update: with linux, split with -p is available to split on a regexp - then the perl script only has to shell that and cleanup after as follows: glob for the per sequence files, cat each 1000 files at a time together into some second naming convention and remove each 1000 per iteration - on second thoughts I prefer what follows after all!)
This would create the 270 files with suffixes .aa thru .jj
__________________________________________________________________________________
^M Free your mind!
In Section
Seekers of Perl Wisdom
|
|