[nesting maps] would be quite hard for n levels where n is determined at runtimeThat's what Algorithm::Loops 'NestedLoops' is for. And (because I need to practice using it) the solution corresponding to yours would be
use Algorithm::Loops 'NestedLoops'; my @hosts = NestedLoops([([1..254])x2], sub { "192.168.$_[0].$_[1]" }) +;
In reply to Re^2: Adding an Entire Class B IP Range to an Array
by Roy Johnson
in thread Adding an Entire Class B IP Range to an Array
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |