in reply to Hash Printing Question

2501 is right, hash keys are not considered to be barewords under -w and use strict, but you can also single quote it.

print "name: ${input_queue}{'name'}\n";

Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Replies are listed 'Best First'.
Re: Re: Hash Printing Question
by websavvy (Initiate) on Dec 01, 2000 at 01:42 UTC
    When I did that, I got the following:
    name: {'name'}
    as output.
      Oops... In a double-quoted string, ${input_queue}{'name'} is interpreted as the scalar variable $input_queue, followed by the string {'name'}. I didn't realize that when I wrote my answer either.

      So, you really do need to remove those extra braces: print "name: $input_queue{'name'}\n";