Skip to content

Instantly share code, notes, and snippets.

@timw4mail
Created May 4, 2012
Embed
What would you like to do?
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