Skip to content

Instantly share code, notes, and snippets.

@timw4mail
Created May 4, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timw4mail/2597568 to your computer and use it in GitHub Desktop.
Save timw4mail/2597568 to your computer and use it in GitHub Desktop.
Perl vs PHP
<?php
header('Content-type: text/html;charset=utf-8');
?>
<!DOCTYPE html>
<html>
<head>
<title>My First Perl Script</title>
</head>
<body>
<h1>It works!</h1>
</body>
</html>
#!/usr/bin/perl
use warnings;
use CGI;
my $cgi = new CGI();
print $cgi->header(
-Content-type => "text/html;charset=utf-8"
);
my $html = <<"HTML";
<!DOCTYPE html>
<html>
<head>
<title>My First Perl Script</title>
</head>
<body>
<h1>It works!</h1>
</body>
</html>
HTML
print $html;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment