Using IPC::Run.
Would like to examine all the built-in special error variables: $@, $!, $^E, and $?. After an IPC::Run 'run', when I try to check $! and $^E, I get 'Illegal seek'.
run (\@commandArray, \$in, \$error, timeout(3));
print "LIB LEVEL ERROR: $!\n";
print "OS LEVEL ERROR: $^E\n";
On some systems in some situations, $^E is not supported. But, $! should be available. IPC::Run hands back $error (given the code above). But, it does not necessarily give back all the detail that can be gleaned from cruising through the built-in error vars.
I like using IPC::Run and would like to continue doing so. But, need a robust mechanism for catching error info. It appears that IPC::Run is monkeying with $! and $^E.
Any ideas on how to capture the error detail after an IPC::Run run call?