in reply to flat file problem

Your code syntax above is incorrect - the line:

open(FLATFILE, ">> /tmp/flatfile.data" or die $!...);

..should read:

open(FLATFILE, ">> /tmp/flatfile.data") or die $!;

I don't know whether this is just an error you introduced while posting this question otherwise it should have given you an error.

Apart from that I can't see anything wrong with the file writing logic which leads me to a couple of conclusions:

Are you sure the permissions are correct? Chances are when you run it via the form it's not using same user account that it does at the command line - and that account may not have permission to write (which is likely as most "web-user" accounts on servers have very few permissions by default for security reasons).

What platform/OS etc is this running on may I ask?

--- Jay

All code is untested unless otherwise stated.
All opinions expressed are my own and are intended as guidance, not gospel; please treat what I say as such and as Abigail said Think for yourself.
If in doubt ask.

Replies are listed 'Best First'.
Re^2: flat file problem
by csuhockey3 (Curate) on Oct 28, 2004 at 07:55 UTC
    Hi gothic_mallard and pelagic . Sorry for the code typo -- indeed it was a mistake writing my post.

    I am working on a development server (Solaris). I will check agian tomorrow and verify my permissions are correct on both the development and production servers. I am wondering if documentroot might be the issue. I suppose it's possible to have /tmp in a different location on each of those servers, although I thought they are mirrors. Thanks for the quick replies from both of you.