[ol][*]data0:[*]apple[*]banana[*]cherry[/ol][ol][*]open my ($d), \'data0\';[*]my %a = map { chomp; $_, 1 } ;[*]print \"$_:$a{$_}\\n\" for keys %a;[/ol][ol][*]data1:[*]apple? ? 20[*]banana??15[*]cherry??22[/ol][ol][*]open my ($d), \'data1\';[*]my %a = map { split;} ;[*]print \"$_:$a{$_}\\n\" for keys %a;[/ol][ol][*]data2:[*]apple[*]20[*]banana[*]15[*]cherry[*]22[/ol][ol][*]open my ($d), \'data2\';[*]my %a = map { chomp; $_} ;[*]print \"$_:$a{$_}\\n\" for keys %a;[/ol]
追问看起来怎么是乱码。。
本回答被提问者和网友采纳