Perl Programming | ||
---|---|---|
Hashes | ||
print "A bicycle has $wheels{bike} wheels.\n"; $wheels{bike} = 4; # Adds training wheels print "A bicycle with training wheels has $wheels{bike} wheels.\n"; Output: A bicycle has 2 wheels. A bicycle with training wheels has 4 wheels. |
||
Previous | http://stuff.mit.edu/iap/perl/ | Next |