in reply to Re: Data structure / hash reference question
in thread Data structure / hash reference question
You were close :)
my $class = 'regex1'; my $color = ( first { $class =~ /$_->{'re'}/ } @rules )->{ color }; + print "$color\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Data structure / hash reference question
by roboticus (Chancellor) on Apr 21, 2012 at 18:07 UTC | |
by stevieb (Canon) on Apr 21, 2012 at 18:42 UTC | |
by tobyink (Canon) on Apr 22, 2012 at 08:45 UTC | |
by stevieb (Canon) on Apr 22, 2012 at 13:10 UTC | |
|
Re^3: Data structure / hash reference question
by hperange (Beadle) on Apr 21, 2012 at 15:27 UTC |