Created
May 4, 2012 20:33
-
-
Save timw4mail/2597568 to your computer and use it in GitHub Desktop.
Perl vs PHP
This file contains hidden or 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
<?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> |
This file contains hidden or 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 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