fiddler42 has asked for the wisdom of the Perl Monks concerning the following question:
I am building a couple of different hash tables like so (notice the 4 separate variables in the key name, starting with $F):-
$TotalMatchesHash{$F,$BBEL,$AR,$VL} = $MatchCount;
I am able to do everything I need to do with the hash tables, like find matching keys, process results, etc. But I running into a problem as I wrap up my routine: when I print the key names, I see this:-
original key is 5<fs>19<fs>56<fs>46
...and I cannot work around the <fs> characters, and it is important that I retrieve those 4 original variable values (all integers).
Any suggestions? The code below reveals what I am trying to do. Notice the split line that references <fs>, which does NOT work...
Thanks,
-Fiddler42
foreach (keys %NewRFactorAverageHash) { $RScale = $NewRFactorAverageHash{$_}; print ("original key is $_\n"); @LaL = split (/<fs>/, $_); print ("new key is $LaL\n"); $F = $LaL[0]; $BBEL = $LaL[1]; $AR = $LaL[2]; $VL = $LaL[3]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mystery character in hash key name
by Roy Johnson (Monsignor) on Sep 08, 2009 at 19:22 UTC | |
by fiddler42 (Beadle) on Sep 08, 2009 at 20:01 UTC | |
by bv (Friar) on Sep 08, 2009 at 21:49 UTC | |
|
Re: Mystery character in hash key name
by SuicideJunkie (Vicar) on Sep 08, 2009 at 19:22 UTC | |
|
Re: Mystery character in hash key name
by moritz (Cardinal) on Sep 08, 2009 at 19:25 UTC |