in reply to Refactoring technique?
If the elements have no individual meaning, why name them at all? Make them unnamed array members.
use Algorithm::Combinatorics ':all'; foreach (permutations([$x, $y, $z])) { doStuff($_) if $_->[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Refactoring technique?
by BrowserUk (Patriarch) on Apr 24, 2015 at 14:15 UTC |