Created
March 6, 2025 06:11
-
-
Save bg1bgst333/9907ee321299e0607a972715dc7bfdf1 to your computer and use it in GitHub Desktop.
CGI::Carp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; # 厳密な文法チェック. | |
use CGI; # CGI | |
use CGI::Carp; # CGI::Carp | |
# CGIオブジェクトの作成. | |
my $q = CGI->new; # CGI::newでCGIオブジェクトを生成し, $qに格納. | |
# HTTPヘッダの出力. | |
print $q->header; | |
# HTMLヘッダの出力. | |
print $q->start_html("CGI::Carp"); # <html>タグなどの出力. | |
# エラー発生. | |
croak "CGI::Carp!"; # croakで"CGI::Carp!"と出力. | |
# HTMLフッタの出力. | |
print $q->end_html; # </html>タグなどの出力. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment