perl 示例1

#!/usr/bin/perl
@names = qw / fred betty barney dino wilma pebbles bamm-bamm /;
@lines = <STDIN>;
foreach (@lines){
print "$names[$_-1]\n";
}
posted @ 2010-07-28 17:13  waynechen  阅读(198)  评论(0编辑  收藏  举报