Skip to content

Commit

Permalink
Added note about fat comma quoting.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromatic committed Feb 29, 2012
1 parent bdd3fd0 commit 0469227
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,6 @@ E: [email protected]

N: Jean-Pierre Rupp
E: [email protected]

N: Tom Christiansen
E: [email protected]
36 changes: 22 additions & 14 deletions sections/idioms.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 0469227

Please sign in to comment.