in reply to Re: Unable to extract value from hash table
in thread Unable to extract value from hash table
use constant CONST_STR => "MYSTRING"; use constant CONST_ID => 1; my %TAGS = ( CONST_STR, CONST_ID ); my $fullString = "123456 MYSTRING 123456"; my $string; ($string) = $fullString =~ /[A-Za-z]*/; print $TAGS{$string};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Unable to extract value from hash table
by ikegami (Patriarch) on Apr 09, 2008 at 06:40 UTC | |
by dr_dunno (Novice) on Apr 09, 2008 at 06:45 UTC | |
by ikegami (Patriarch) on Apr 09, 2008 at 06:49 UTC |