perlで超素朴な質問
超初心者です。
辞書から不必要な文字を消そうをしていますが、はじめのファイルを読み出すから
行き詰っています。
下が使いたい辞書データです。
------------
word,trans,exp,level,memory,modify,pron,filelink
"さまざまな理由から [さまざまなりゆうから]","(exp) for various reasons","",0,0,0,""
"さめざめ","(adv) sorrowfully/anguishedly","",0,0,0,""
"さもしい","(adj) selfish/self-seeking/self-interested/mean","",0,0,0,""
"さようならホームラン","(n) game-ending home run (baseball)","",0,0,0,""
"さよならホームラン","(n) game-ending home run (baseball)","",0,0,0,""
"さらけ出す [さらけだす]","(v5s) to expose/to disclose/to lay bare/to confess","",0,0,0,""
"さらさら","(adj-na,adv,n,vs) (1) rustling/murmuring/(2) fluently/(3) silky (hair)/(P)","",0,0,0,""
"さらば","(conj,int) farewell","",0,0,0,""
"さん","(suf) Mr or Mrs/(P)","",0,0,0,""
"さーたーあんだぎー","(n) type of Okinawan doughnut (donut)","",0,0,0,""
"さ来週 [さらいしゅう]","(n-adv,n-t) week after next","",0,0,0,""
"さ迷う [さまよう]","(v5u) to loiter/to putter/to prowl/to wander about/to roam about/to knock around","",0,0,0,""
"ざあざあ","(adv) sound of rushing water/sound of pouring rain/white noise sound/(P)","",0,0,0,""
"ざあっ","(n) (onom) sound of water","",0,0,0,""
"ざくざく","(adj-na,adv) lots of coins or jewels/cutting up roughly/mixing gravel/walking on frost","",0,0,0,""
"ざけんなよ","(exp) (X) (vulg) fuck you!/""don't fuck around""/""don't be a screw off""","",0,0,0,""
"ざっくざっく","(adv) crunch crunch/thud thud/tramp tramp","",0,0,0,""
"ざっくばらん","(adj-na,n) frankness","",0,0,0,""
"ざっと","(adv) roughly/in round numbers/(P)","",0,0,0,""
"ざぶんと","(adv) with a splash","",0,0,0,""
------------------
そして組んだのがこれです。
use encoding "cp932";
$/ = "\r\n";
open(DIC, "+> DicData.csv") or die("Error:$!");
while(<DIC>){
$data = $_;
}
if($a =~ /"/){
$a =~ s/"//g;
}
close(DIC);
-----------
お恥ずかしい限りです。
なにとぞよろしくお願いします。