Last updated on January 22nd, 2016 at 03:45 am

VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)

HTML in perl script

Embedding HTML inside a perl script is very easy. Below is an example on how to accomplish that.

#!/usr/local/bin/perl -wT
use CGI;
my $query = CGI->new();
my $ip_Addr = $query->remote_addr();
print <<"STARTHTML";
<head><title>YOUR IP ADDRESS</title></head>
<h3>Your ip address is $ip_Addr</h3>
<a href="">Click here to go back</a>

Make a note of the STARTHTML variable I have added. You are free to add any according to your wish. Just make sure you add that at the end of the HTML script as shown above.

VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)

Leave a Reply

Your email address will not be published. Required fields are marked *