sOKOle has asked for the wisdom of the Perl Monks concerning the following question:

such a simple code:
#!/usr/bin/perl open (COUNTING, "< D:\StronyKlientow\cematsil.bptnet.pl\main\Alicja\pe +rl\counter.txt")||die"can not open"; $count = <COUNTING>; close (COUNTING);

Always returns:
CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: can not open at D:\StronyKlientow\cematsil.bptnet.pl\main\Alicja\perl\counter.pl line 6.

Doesn't matter what directory path I write. Is the code wrong? Or server (Apache) is not configured properly? Perl scripts works properly if I do not require any file operations.
I suppose that it is something wrong with the server. Could you help?

Thank you in advance,
Regards,
sOKOle

Replies are listed 'Best First'.
Re: Is it server configuration or my error ??
by rdfield (Priest) on Jul 18, 2002 at 09:42 UTC
    I suspect the problem is the backslashes. Try it with forward slashes instead (ie try "D:/StronyKlientow/cematsil.bptnet.pl/main/Alicja/perl/counter.txt"). The error message is correct - the backslashes are being interpolated and messing up your filename/path.

    rdfield