in reply to open fails with no error code
Have you tried using the perl debugger?
If you have identified the particular open statement that causes the failure, and you can work out the line number of that statement, run the script with a command line like this:
Where the square brackets around "..." mean "this is where you would put command-line args for the script, if it takes args, otherwise, don't put anything here".perl -d name_of_script [...]
That runs the script via the perl debugger, which starts by giving you a prompt for what to do next. At this point, it's handy to have the source code on display in a separate window (e.g. in an editor).
The first thing to do is "b NNN" (where NNN is the line number of the open statement in question). This sets a breakpoint at that line, so that the debugger will stop execution and prompt you for more things to do just before it executes the chosen line. After setting the breakpoint, enter "c" to "continue" execution of the script, and wait for it to reach the breakpoint.
Once execution stops, use the "p" command to inspect the values of relevant variables, to confirm that they contain what you expect. Read the "perldebug" man page, and try the "h" command in the debugger for more pointers on what you can do.
|
|---|