: Hello, I have recently gotten the responsibility of creating my kung
: fu kwoons website. Given I am a C++ programmer, I have no interest in
: PERL, as you probably have the oppisite opinion. I am searching for
: an apparently simple method to take the characters in a text file,
: and put it into the html document.
:
: I was using javascript, but many dependancies and abiguities between
: shtml, javascript and a piece of java I am using have forced me to
: use CGI. I would be very pleased if you could help me out. Thanks!
OK, the following script opens a text file and puts it amongst some HTML code.
#!/usr/bin/perl
#Read in file.
open my $fh, "< path/to/file.txt";
my $file = join('', <$fh>);
close $fh;
#Print HTTP header.
print "Content-type: text/html\n\n";
#Print page file contents in it.
print qq{
<html>
<b>File Contents</b><br>
$file
</html>
};
Hope this helps,
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");