Perl CGI 四則演算でブラウザに表示する方法
2022年7月3日
テキストファイルにコピーして*.cgiで保存
http://localhost/cgi/blog/sisoku.cgiなどのファイル名でアクセスしてください
↓–Perlのパスはレンタルサーバーなどで確認してください
#!c:/xampp/perl/bin/perl
#┌────────────────────────────────
#│四則演算でブラウザに表示する方法
#| + - * /
#└────────────────────────────────
#==========ここから下がスクリプト===================================
# [ 設定 ]
$ver = ‘ Version 1.00’;
print “Content-type: text/html\n\n”;
print “<HTML>”;
print “<BODY>”;
$a=4+5;
print $a;
# 著作権表示(削除不可)
print <<tyosaku1;
<br><br><br><br>
<center><small>
$ver
</small></center>
tyosaku1
print <<tyosaku;
<br>
<center><small>
<a href=’https://cgishop.net/’ target=’new’>CGI Shop</a>
</small></center>
</BODY>
</HTML>
tyosaku
Last Updated on 2022年11月6日6:12 am by cgishop