I have a program the same as the code before and I was wondering how you can display this as HTML in a browser. As in I have a file that I wish to display the contents of as a web page.
Thank You
Thank You
Code:
#!/usr/bin/perl
use strict;
use warnings;
use CGI "Vars";
use 5.004;
use Fcntl qw(:DEFAULT :flock);
use CGI::Carp qw(fatalsToBrowser);
my ($filename, @all, $list, @items, $item);
$filename = "msgs";
open(MYFILE,"< $filename");
@all=<MYFILE>;
$list ="@all";
@items = split /__FINISH__\n/ , $list;
for my $item (@items)
{
my($name, $email, $subject, $text) =split /\n/, $item, 4;
print "Name:- $name\n";
print "Email:- $email\n";
print "Subject:- $subject\n";
print "Message:- $text\n";
}