Tableを書いてみる
制御の練習としてTable書いてみた。掲示板でも投稿表示には使うかもしれないから。
vim table1.pl
sキーおして、
#!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; print "<table border=\"1px\">"; my $count = 0; while($count < 5){ print "<tr><td>".$count."</td></tr>\n"; $count ++ ; } print "</table>";
escで抜けて、
:save table1.pl
:quit
vim抜けて、
ln table1.pl /Library/WebServer/CGI-Executables/table1.pl
chmod 705 /Library/WebServer/CGI-Executables/table1.pl
ブラウザから