cancel
Showing results for 
Search instead for 
Did you mean: 

perl not opening file

N/A

perl not opening file

I am having problems getting perl to open a text file. The code is:
my $HANDLE;
my $file = "../../test/hello.txt";
open ($HANDLE, "> $file") || die "could not open file: $!";
print $HANDLE "hello world";
close $HANDLE;

this works locally and using telnet to run perl -c shows all is ok once uploaded to force9, but when I try to call the page in a browser, I get this message:
"Can't use an undefined value as filehandle reference "
has anyone any ideas? Thanks, Jack
1 REPLY
N/A

RE: perl not opening file

PS. the same script works on a Nildram server! what's different about the force9 setup?
Any ideas?
Jack