So I'm working on a server where I can't install any modules whatsoever. Yes this makes my job difficult.
To complete the rest of my script I need to do something that I had thought would be fairly straightforward but it seems to be anything but.
I'm trying to open an .html file as one big long string. This is what I've got:
open(FILE, 'index.html') or die "Can't read file 'filename' [$!]\n";
$document = <FILE>;
close (FILE);
print $document;
which results in:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
However, I want the result to look like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
This way I can search the entire document more easily.
Anyone know how to do this? Thanks.