文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>map 的奇妙用法

map 的奇妙用法

时间:2008-05-16  来源:yjc0407

=hand1
map other usage

use strict;
use warnings;
sub readconfig{
    my ($fileName) = @_;
    my @contents;
    my %tempHash;
    open(FH,$fileName);
    chomp (@contents = <FH>);
    #print @contents,"\n";
    %tempHash = map{join ("_", split /\s+/),$_} @contents;//it is very wizardly,
    return \%tempHash;
    
}
    my $fil = shift @ARGV;
    my $ret = readconfig($fil);
    #print %$ret,"\n";
    for(sort keys %$ret){
        print $_,"->",$ret->{$_},"\n";
    }

=pod @ARGV[0]=1.txt
1.txt

tenpctm us weekly
tpatr us weekly
tenpctm us monthly

=cut
相关阅读 更多 +
排行榜 更多 +
坦克战争世界

坦克战争世界

模拟经营 下载
丛林反击战

丛林反击战

飞行射击 下载
几何飞行安卓版

几何飞行安卓版

飞行射击 下载