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 "$!");
| [reply] [d/l] [select] |
A few pointers...
And most importantly, you already asked this question, continue it in that thread. Thanks.
Update: If you're wondering about the link, this node was originally in reply to a separate thread that was reparented to this thread. Glad we cleared that up ;).
| [reply] |
If you're printing out the lines, but they aren't printing as you would like, your problem is probably that you're printing plain text but your browser is expecting HTML. This suggests two solutions:
- tell your browser to expect plain text, or
- have your script print valid HTML.
It's probably easier to accomplish 1 than 2: just change the string "Content-type: text/html\n\n" to "Content-type: text-plain\n\n" and you should get a readable, if boring, output. If you want to output HTML, you should look at using CGI.pm, which makes it fairly easy to do such things.
And yes, please do read the links proposed above by cjf--they will make your life easier and get you better answers faster.
If God had meant us to fly, he would *never* have given us the railroads. --Michael Flanders
| [reply] |
--
Joost downtime n. The period during which a system
is error-free and immune from user input.
| [reply] [d/l] |