推 salagadoola:應該只是把變數初始化而已 07/24 17:08
我是從Perl cookbook上抄下來的
想請問
$seen = ();
和
@uniq = ();
這兩句的作用和意思是什麼啊 @@
在書上沒翻到 =.=
-----------------------
$seen = ();
@uniq = ();
foreach $item (@list) {
unless ($seen{$item})
$seen{$item} = 1;
push(@uniq, $item);
}
}
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.191.4