I need a little help with a perl script (to read the content of a folder and put it into a *html file).
it does the trick, my problem, I want to delete these two lines of the output.
print "Content-Type: text/html\n\n";
$file = 'index.html';
open(INDEX ,">$file") || die "Error $!";
print INDEX "<html><head><title>Folder Content</title></head><body>\n";
print INDEX "<h1>Headline</h1>\n";
print INDEX "Hello World"
foreach( glob( "*.*" ) )
print INDEX "<a href=\"$_\">$_</a><br/>\n";
print INDEX "</body></html>\n";
Since I have the index.html and index.pl files in that folder, they are listet on the output to. I want to delete these 2 lines from the file... ( I know I could delete index.html before I call the script and call the script from outside the folder, but I want to run it that way and keep all files in one place.)
Since this is the only time I use perl I do not want to read hundreds of tutorials (yes I already read a couple and googled), but I did not find the answer...
Any help is appreciated!