use strict; use warnings; use Data::Dumper; use DB_File; my %words; tie %words, 'DB_File', 'words.db'; load() if $ARGV[0]; print Dumper \%words; sub load { my $cnt = 1; foreach my $key ( 'John Cleese', 'Graham Chapman', 'Eric Idle', 'Ter +ry Jones', 'Michael Palin') { $words{$key} = "Gumby $cnt"; $cnt++; } }
In reply to Re^2: hash function
by grep
in thread hash function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |