|Keep It Simple, Stupid|
Open: Invalid Argumentby jhs3 (Novice)
|on Jun 01, 2007 at 15:47 UTC||Need Help??|
jhs3 has asked for the
wisdom of the Perl Monks concerning the following question:
Such a simple problem I have. It is so simple, I will explain at length.
'kirk' is the NT server.
I can't figure this out, so I go to the NT server. I log in as userid 'root' - which is an Admistrator on the server. I open a 'cmd' window. I run the perl program string from the command line, and get this result:
This is the result I would expect to get from running on Unix.
The perl script opens the file 'comp_one.lst'. It is in a variable, but the command that dies is:
OK. The script fails when I run it from Unix, but runs on the NT server. I try another thing - I delete the 'comp_one.lst' file and run it in the command window again:
This tells me that the script really expects that 'comp_one.lst' file to be there so it can be opened. If it is not there, it gets the same error I get when I try to run it from the shell script on Unix.
But, when I run it from Unix, the file IS there. So, I think I am getting into some sort of permissions problem. And this may be more of an NT - permission - remsh error than a perl error. Anyone want to give me some insight here?
One definite perl question: is there a better way I can trap the error it gets when it tries to open the file? If the open fails - how can the perl program 'see' that and just create it if it isn't there, delete it and recreate it if it is there?