条件分岐
条件分岐の構文は
if(条件){
実行ブロック
}else{
};
です。
例えば
#!C:/Perl/bin/perl.exe print "Content-type: text/html\n\n"; $a=30; if($a==30){ print "本当"; }else{ print "うそ"; };
を実行した場合に「本当」という結果が画面に表示されます。
戻る