use strict; use Algorithm::Loops qw( NextPermute );