Any idea how I can get this to work?---------------------------------------------------- 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}; ----------------------------------------------------
In reply to Unable to extract value from hash table by dr_dunno
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |