my %numbers = ( num1 => 1, num2 => 2, ... num10 => 10, ); # which can be constructed programmatically as: my %numbers = map { "num$_" => $_ } (1..10);