Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
  1. You shouldn't use Switch.pm, it has subtle bugs.
  2. What's the switch for here anway, all you're doing is execute one "case" after the other, there's no fall-through or anything that requires this execution out of a standard for-loop.
  3. Running this codes gives the following output:
0 --HASH(0x82bfd04) Data_Directories_fetch 1 --HASH(0x828b9a8) Data_Directories_erase 2 --HASH(0x82bbf40) Program_fetch 3 --HASH(0x82bfcbc) Program_erase 4 --HASH(0x82bbec8) Configuration_and_Table_Files_erase 5 --HASH(0x815b734) Configuration_and_Table_Files_fetch 6 --HASH(0x82bbee0) Create_Database 7 --HASH(0x82bbe38) Load_Database HASH(0x82bbf40) Result: HASH(0x82bbf40)

Loading some values into the Program_fetch hash first gives:

0 --HASH(0x82bc21c) Data_Directories_fetch 1 --HASH(0x82bfd00) Data_Directories_erase 2 --HASH(0x8160c8c) Program_fetch 3 --HASH(0x82bc0f0) Program_erase 4 --HASH(0x82bfce8) Configuration_and_Table_Files_erase 5 --HASH(0x815b728) Configuration_and_Table_Files_fetch 6 --HASH(0x82bc12c) Create_Database 7 --HASH(0x82bfd84) Load_Database HASH(0x8160c8c) 1 => 2 3 => 4 Result: HASH(0x8160c8c) 1 => 2 3 => 4

Which is exactly what I'd expect. What are you expecting to see?


There are ten types of people: those that understand binary and those that don't.

In reply to Re: Dereferencing Mystery by tirwhan
in thread Dereferencing Mystery by Anonymous Monk

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 lurking in the Monastery: (6)
As of 2024-03-28 15:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found