perl 示例1
#!/usr/bin/perl
@names = qw / fred betty barney dino wilma pebbles bamm-bamm /;
@lines = <STDIN>;
foreach (@lines){
print "$names[$_-1]\n";
}
@names = qw / fred betty barney dino wilma pebbles bamm-bamm /;
@lines = <STDIN>;
foreach (@lines){
print "$names[$_-1]\n";
}