在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
#!/usr/bin/perl -w use strict; my @array = (5, 'a', 'c', 10, 'b' ); my @new_array = (map { $_*2 if m/\d/; } @array); print "@new_array \n" ; print $#new_array; #print join(",", @new_array), "\n";
@teams = qw(Miami Oregon Florida Tennessee Texas Oklahoma Nebraska LSU Colorado Maryland); %rank = map { $teams[$_], $_ + 1 } 0 .. $#teams; print "Colorado: $rank{Colorado}\n"; print "Texas: $rank{Texas} (hook 'em, Horns!)\n";
|
请发表评论