Last updated on January 22nd, 2016 at 03:45 am
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"; <html> <head><title>YOUR IP ADDRESS</title></head> <body> <h3>Your ip address is $ip_Addr</h3> <p></p> <a href="http://127.0.0.1">Click here to go back</a> </body> STARTHTML
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.