in reply to Adding hash values together
$hash{20} = 1; # Same as $hash{'20'} = 1; $hash{2e1} = 2; # Same as $hash{'20'} = 2; $hash{'2e1'} = 3; # Same as $hash{'2e1'} = 3; $hash{'2E1'} = 4; # Same as $hash{'2E1'} = 4; $hash{0+'2e1'} = 5; # Same as $hash{'20'} = 5; $hash{0+'2E1'} = 6; # Same as $hash{'20'} = 6; # '2E1' => 4, '2e1' => 3, '20' => 6
Update: Changed the wording in the comments to avoid further confusion.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding hash values together
by MonkPaul (Friar) on Jun 30, 2005 at 18:06 UTC | |
by ikegami (Patriarch) on Jun 30, 2005 at 18:19 UTC |