#Sample use: @ARGV= sort @ARGV; do { print "@ARGV\n"; } while( nextpermute(@ARGV) );