Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Floats with trailing zeros as a hash key

by hardburn (Abbot)
on May 09, 2003 at 14:43 UTC ( [id://256884]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %ITEMS = (
        29.95 => 'item 1', 
    ...
        45.20 => 'item 3',  # Oh oh!
        58.29 => 'item 4', 
    );
    
  2. or download this
    print $_, "\n" foreach (keys %ITEMS);
    
    ...
    38.55
    45.2
    29.95
    
  3. or download this
    my %ITEMS = (
        29.95   => 'item 1', 
    ...
    45.2
    45.20
    29.95
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://256884]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found