We don't bite newbies here... much | |
PerlMonks |
Re^7: regular expessions question: (replacing words)by jethro (Monsignor) |
on Sep 28, 2010 at 22:44 UTC ( [id://862523]=note: print w/replies, xml ) | Need Help?? |
That with the 0 and 1 would only have been necessary if you needed to compress the data , i.e. save memory. Which you say isn't the case. Ok, here is the subroutine that counts rows with all 'z' in specific columns:
Now to get an array of random numbers. To make sure I don't get numbers twice I generate an array of all numbers up to the number of columns and pick (i.e. extract and delete) random numbers from that array
You see how I cut the problem into smaller pieces that are easier to tackle? Ok, the subroutines are still not trivial. But you should be able to connect them in a sensible way to solve your problem
In Section
Seekers of Perl Wisdom
|
|