Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Permutations in reverse order

by Khen1950fx (Canon)
on Mar 02, 2013 at 00:52 UTC ( #1021370=note: print w/replies, xml ) Need Help??

in reply to Permutations in reverse order

Something like this? Warning: the resulting list of descending permutations will list every descending permutation, and it only stops when it returns to the original ascending list.
#!/usr/bin/perl -l use strict; use warnings; use Algorithm::Loops qw(NextPermute); my(@list) = (1..14); do { print join(",", reverse @list); } while( NextPermute(@list) );

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021370]
[james28909]: dontcha love it!
[james28909]: Today would be scalar localtime. Yesterday would be scalar localtime - 1. sunday - monday would variate scalar localtime - ?
[james28909]: oops s/sunday - monday/sunday - saturday/
[james28909]: my mind is blown haha
[james28909]: hmm, i haz idea!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2017-04-29 03:59 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.