in reply to Re^2: Value into array
in thread Value into array
A hash instead of an array could be useful for you:
use strict; use warnings; my %hash = ( N1 => { A => 1, B => 1}, N2 => { A => 1, B => 1}, N3 => { A => 1, B => 1}, N6 => { A => 1, B => 1}, N7 => { A => 1, B => 1}, ); # usage e.g. print $hash{N3}{A}, "\n";
In Section
Seekers of Perl Wisdom