in reply to Re^2: print hash of hashes with a reference
in thread print hash of hashes with a reference

Notice that the second level keys have whitespace at the end, and notice that your print statement uses a key of cmd (no whitespace). You should trim the whitespace when you construct the hash.

You should also take notice here that the values have \n (and possibly other whitespace) at the end (which may also bite you, depending on how you intend to use them).