Try this...
 
open(FILE, "d:\\path_to\\textfiles\\test.txt") or die "Can't open $!";
 
Or,
 
open(FILE, 'd:\path_to\textfiles\test.txt') or die "Can't open $!";
 
-Henry

        -----Original Message----- 
        From: steve silvers [mailto:[EMAIL PROTECTED]] 
        Sent: Mon 7/15/2002 12:58 PM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: FILEHANDLE Problem
        
        
This is going to drive me nuts.... I have my test snippet below....

#!/Perl

When I run this as shown below, I get the error: Invalid argument.

open(FILE, "d:\path_to\textfiles\test.txt") or die "Can't open $!";

        if(eof(FILE)) {
                print "IM EMPTY";
        }
        else {
                while (<FILE>) {
                chomp;
                print;
                }
        }

When I run it as:
open(File, "../textfiles/test.txt")

I get file or directory not found. Now I know that all is well and the file
exists. I come out of the cgi-bin, and into the textfiles directory, and get
the test.txt file. But to no prevail.

Any suggestions greatly appreciated.
Steve.

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


z¹VŠ}öRÇ«²f¢–)à–+-=êåZ)÷ÙK®Éb²Û®ð¶+ÞJÖ­yÊ&N‹§²æìr¸›zm§ÿåŠËlz»Àrدy+Zµç(›ùšŠYšŸù²²æì


Reply via email to