in reply to Reading data from a document.txt

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: STILL PROBLEMS READING THE FILE.TXT!!!!
by dws (Chancellor) on Jun 12, 2002 at 16:16 UTC
    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 "$!");

Re: Reading variables from a flat file
by cjf (Parson) on Jun 12, 2002 at 16:14 UTC
Re: STILL PROBLEMS READING THE FILE.TXT!!!!
by ChemBoy (Priest) on Jun 12, 2002 at 16:24 UTC

    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:

    1. tell your browser to expect plain text, or
    2. 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

Re: STILL PROBLEMS READING THE FILE.TXT!!!!
by Joost (Canon) on Jun 12, 2002 at 16:18 UTC
    (Joost takes a deep breath)

    Read How (Not) To Ask A Question and come back when you've done so.

    -- Joost downtime n. The period during which a system is error-free and immune from user input.