Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
notes:perl_cheat_sheet [2013/09/22 14:20] smthng [Lists and Arrays] |
notes:perl_cheat_sheet [2013/09/22 19:28] (current) smthng [Hashes] |
||
---|---|---|---|
Line 70: | Line 70: | ||
* To initialize a hash :<code perl> | * To initialize a hash :<code perl> | ||
%some_hash = ( ' | %some_hash = ( ' | ||
- | * When using an arrow (a fat-comma), simple keys don't have to be quoted (barewords) . | + | * When using a big arrow (a fat-comma) |
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * To iterate over hash : <code perl> | ||
+ | print "$key => $value\n"; | ||
+ | print "$key => $hash{$key}\n"; | ||
+ | * %ENV hash holds environment variables. | ||
===== Control Structures ===== | ===== Control Structures ===== | ||