Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi,

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]; }

In reply to Mystery character in hash key name by fiddler42

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found