![]() |
|
Do you know where your variables are? | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
I have a unix program lets call it x that processes a file and takes the following parameters:
so a typical invokation could be this will read foo from line 5 to line 100 inclusive and produce do something with them I want to call x few times with (--firstLine,--lastLine) like this (1,1000) (1001,2000) .... so effectively I am processing foo in chunks of 1000 lines if I do this and foo has millions of lines the processing time will increase as I progress with the chunks because x is scanning foo to reach firstLine. I cannot change x and want to write a Perl wrapper for x that reads foo from line 1 to the end and send every chunk of 1000 lines to x and this way I avoid scannig foo multiple times. Is this possible? update (broquaint): added formatting In reply to splitting an input stream by Anonymous Monk
|
|