in reply to Re: Value of a key in hash in hex
in thread Value of a key in hash in hex
I have tested below code and it doesn't show the reference, I am just trying to figure out what is the difference between this and what I have pasted earlier
#!/usr/bin/perl # create our perl hash $prices{"pizza"} = 12.00; $prices{"coke"} = 1.25; $prices{"sandwich"} = 3.00; #-------------------------------------------------- # option 1: # print the hash key and value using a foreach loop #-------------------------------------------------- foreach $key (keys %prices) { print "$key costs $prices{$key}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Value of a key in hash in hex
by hippo (Archbishop) on Jul 20, 2017 at 17:37 UTC | |
|
Re^3: Value of a key in hash in hex
by AnomalousMonk (Archbishop) on Jul 20, 2017 at 22:05 UTC |