David______ David______
关注数: 12 粉丝数: 21 发帖数: 5,392 关注贴吧数: 7
昨天晚上的成果 #!/usr/bin/perl#use warnings;my @qingyin = (["あ", "い", "う", "え", "お"],["か", "き", "く", "け", "こ"],["さ", "し", "す", "せ", "そ"],["た", "ち", "つ", "て", "と"],["な", "に", "ぬ", "ね", "の"],["は", "ひ", "ふ", "へ", "ほ"],["ま", "み", "む", "め", "も"],["や", "い", "ゆ", "え", "ょ"],["ら", "り", "る", "れ", "ろ"],["わ", "い", "う", "え", "お"],);my @zhuoyin = (["が", "ぎ", "ぐ", "げ", "ご"],["ざ", "じ", "ず", "ぜ", "ぞ"],["だ", "ぢ", "づ", "で", "ど"],["ば", "び", "ぶ", "べ", "ぼ"],);my @banzhuo = (["ぱ", "ぴ", "ぷ", "ぺ", "ぽ"]);my @qingyin1 = (["a", "i", "u", "e", "o"],["ka", "ki", "ku", "ke", "ko"],["sa", "si", "su", "se", "so"],["ta", "ti", "tu", "te", "to"],["na", "ni", "nu", "ne", "no"],["ha", "hi", "hu", "he", "ho"],["ma", "mi", "mu", "me", "mo"],["ja", "i", "ju", "e", "jo"],["ra", "ri", "ru", "re", "ro"],["wa", "i", "wu", "e", "o"],);my @zhuoyin1 = (["ga", "gi", "gu", "ge", "go"],["za", "zi", "zu", "ze", "zo"],["da", "di", "du", "de", "do"],["ba", "bi", "bu", "be", "bo"],);my @banzhuo1 = (["pa", "pi", "pu", "pe", "po"],);my $chosen;system "cls";print "欢迎来到假名练习程序,本程序由Super User编写,如有任何建议,请发邮件至David290\@gmail.com。\n\n";#sleep 3;&mainmenu;exit;sub mainmenu{undef $chosen;until($chosen){system "cls";print "请选择...\n";print "\t1.进入假名练习\n";print "\t2.说明\n";print "\t3.关于本程序\n";print "\t4.退出\n";$chosen= ;chomp $chosen;undef $chosen if ($chosen=~/[^1-4]/);do{undef $chosen if ($chosen > 4 );} if ($chosen);}&enterif ($chosen eq "1");&helpif ($chosen eq "2");&aboutif ($chosen eq "3");}sub enter{my $chosen1;undef $chosen;until($chosen){system "cls";print "请选择练习内容(复选)...\n";print "\t1.清音\n";print "\t2.浊音\n";print "\t3.半浊音\n";print "\t4.全部\n";$chosen= ;chomp $chosen;undef $chosen if ($chosen=~/[^1-4]/);}$chosen1 = "";$chosen1.='1'if ($chosen=~/1/);$chosen1.='2'if ($chosen=~/2/);$chosen1.='3'if ($chosen=~/3/);$chosen1 ='123'if ($chosen=~/4/);undef $chosen;until($chosen){system "cls";print "请输入练习次数...\n";$chosen= ;chomp $chosen;undef $chosen if ($chosen=~/[^0-9]/);}&dotraining(&training($chosen1));}sub about {system "cls";print "本人于2006年7月28日清晨完成了本程序的第一个版本。\n";print "请按任意键继续..."; ;&mainmenu;}sub help {system "cls";print "帮助未完成。\n";print "请按任意键继续..."; ;&mainmenu;}sub training($){my $table = shift;if($table =~/1/){system "cls";print " ";foreach (@{$qingyin[0]}){print "$_段";}print "\n\n";foreach (@qingyin){print "$$_[0]行 ";foreach(@$_){print"$_ ";}print "\n\n";}print "请输入你要练习清音的行。若需要全部,请输入“all”。\n";
首页 1 2 3 4 下一页