Skip to content
Browse files

Added note about fat comma quoting.

  • Loading branch information...
1 parent bdd3fd0 commit 0469227a1bd64a9b20313993f3752e34384b9244 @chromatic committed Feb 29, 2012
Showing with 25 additions and 14 deletions.
  1. +3 −0 CREDITS
  2. +22 −14 sections/idioms.pod
View
3 CREDITS
@@ -245,3 +245,6 @@ E: rvtol@isolution.nl
N: Jean-Pierre Rupp
E: jpierre@xeno-genesis.com
+
+N: Tom Christiansen
+E: tchrist@perl.com
View
36 sections/idioms.pod
@@ -112,24 +112,32 @@ their phone extensions:
my %extensions =
(
- 001 => 'Armon',
- 002 => 'Wesley',
- 003 => 'Gerald',
- 005 => 'Rudy',
- 007 => 'Brandon',
- 008 => 'Patrick',
- 011 => 'Luke',
- 012 => 'LaMarcus',
- 017 => 'Chris',
- 020 => 'Maurice',
- 023 => 'Marcus',
- 024 => 'Andre',
- 052 => 'Greg',
- 088 => 'Nic',
+ '001' => 'Armon',
+ '002' => 'Wesley',
+ '003' => 'Gerald',
+ '005' => 'Rudy',
+ '007' => 'Brandon',
+ '008' => 'Patrick',
+ '011' => 'Luke',
+ '012' => 'LaMarcus',
+ '017' => 'Chris',
+ '020' => 'Maurice',
+ '023' => 'Marcus',
+ '024' => 'Andre',
+ '052' => 'Greg',
+ '088' => 'Nic',
);
=end programlisting
+=begin tip Hash Key Quoting Rules
+
+Fat comma hash key quoting only works on things that look like barewords; these
+keys look like numbers--octal numbers, in specific, with the leading zero. Yes,
+almost everyone makes this mistake.
+
+=end tip
+
To sort this list by name alphabetically, you must sort the hash by its values,
not its keys. Getting the values sorted correctly is easy:

0 comments on commit 0469227

Please sign in to comment.
Something went wrong with that request. Please try again.