home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Australian Personal Computer 2004 July
/
APC0407D2.iso
/
workshop
/
apache
/
files
/
ActivePerl-5.8.3.809-MSWin32-x86.msi
/
_49fe4795fac20d41f0f4c09dddadbc3e
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
2004-02-02
|
386 b
|
22 lines
package UNIVERSAL;
use Attribute::Handlers;
use Tie::RangeHash;
sub Ranged : ATTR(HASH) {
my ($package, $symbol, $referent, $attr, $data) = @_;
tie %$referent, 'Tie::RangeHash';
}
package main;
my %next : Ranged;
$next{'cat,dog'} = "animal";
$next{'fish,fowl'} = "meal";
$next{'heaven,hell'} = "reward";
while (<>) {
chomp;
print $next{$_}||"???", "\n";
}