Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Simultaneous one by one splitting and processing of an uneven file based on a pattern

by GrandFather (Cardinal)
on Sep 10, 2012 at 21:42 UTC ( #992860=note: print w/ replies, xml ) Need Help??


in reply to Simultaneous one by one splitting and processing of an uneven file based on a pattern

So code it up and then ask us for help if you can't get it to work.

Don't use variables a, b and c. You tell us the first variable contains a size or count so the name should include size or count or it should be a word that describes how the count is used. From your description it should be $offset, but maybe you have the maths wrong. Variable names are important, even in pseudo code.

True laziness is hard work


Comment on Re: Simultaneous one by one splitting and processing of an uneven file based on a pattern
Re^2: Simultaneous one by one splitting and processing of an uneven file based on a pattern
by zing (Beadle) on Sep 10, 2012 at 21:55 UTC
    Yes I did tried these two codes, but they dont cater to the triplet selection perl -ne 'BEGIN{ $/="Processing"; } if(/^\s*(\S+)/){ open(F,">$1.out")||warn"$1 write failed:$!\n";chomp;print F "gi", $_ }'
    awk -vRS="Processing" '{ print $0 > "file"t++".out" }' file.txt

      And that relates to the pseudo code you gave how? Show some effort. Take the time to write good code. Avoiding typing a few characters (for names) does not save time. Asking someone to write the code for you also does not save time. If you understand the problem well enough to describe it, you understand it well enough to code it. If you don't understand the problem how are you going to describe it well enough to someone else to have it implemented? Now, pull your finger out and get busy.

      True laziness is hard work

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992860]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-12-26 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls