You were close :)
my $class = 'regex1'; my $color = ( first { $class =~ /$_->{'re'}/ } @rules )->{ color }; + print "$color\n";
In reply to Re^2: Data structure / hash reference question
by stevieb
in thread Data structure / hash reference question
by hperange
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |