in reply to Get Form Data/Write to Text File

For some reason it won't write to text file. It is basically pulling a company code and password off of an HTML document and writing to a text file. Does anybody have any idea?

The open is probably failing. Ask perl to tell you why by changing your open to:

open (FILE,">>$UserDB") or die qq{can't open "$UserDB": $!};

I know you have little experience of Perl, but this really isn't very good code. Where did you get all your bad habits from?

Replies are listed 'Best First'.
Re^2: Get Form Data/Write to Text File
by GrandFather (Saint) on Jun 05, 2007 at 03:43 UTC

    Be nice. ;)

    The OP said I have little Perl experience which also means he has very few Perl habits, bad or otherwise. The strong implication is that this is in the context of inherited (and likely fairly old) code. I'd imagine that the OP was feeling a bit battered by the code before coming here for help, so a gentle "here are some things to watch out for" will go down much better than the implied "here are some dumb ass things you did".

    ++ for helping the OP learn by highlighting issues and pointing to documentation, but be a little aware of how tone affects message: it's the sugar as helps the medicine go down.


    DWIM is Perl's answer to Gödel
      yellow sugar