in reply to Printing a log file in a CGI script
in thread Reading data from a document.txt

First, take a moment to look at your keyboard. On the left side, below the "Tab" key, is on labeled "Caps Lock". Please make sure that you don't press this key before typing titles. If you press it, many people will think that you're shouting, and won't react at all well.

Your problem is a simple one, albeit one that trips up many people. The line   open LOG, "anuncis.txt" || die "$!"; isn't doing what you expect. You need to change it to either   open(LOG, "anuncis.txt") || die "$!"; or   open LOG, "anuncis.txt" or die "$!"; What you have, in effect, is   open LOG, ("anuncis.txt" || die "$!");