Re: Counting command or script
Reply #19 –
Speaking about perl. Found this script which looks pretty slick. I'm trying to optimizing it for example to make it output multiple text files ,not bigger than 5MB instead of a one huge 1 GB text file or more. I need to test a 9x9 string which would require to generate 9^9 variants. Also would be cool if I can make this perl script take some breaks so to give more air bubbles to the cpu so it will not start catch fire lol. Script looks like this.
use Algorithm::Combinatorics qw/tuples_with_repetition/;
print join(" ", map { "[@$_]" } tuples_with_repetition([qw/A B C/],2)), "\n";
Now the output of this gives square brackets like [A B] and in rows. Is there a way to get rid of those brackets + shoot them directly in a column format? Tnx and sorry if I'm abusing of you guys precious time 😬
EDIT: looks like I need perl-math-combinatorics module, omg, didn't see that coming..It's only on the AUR