Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
IPC::Run and Win32::Process::Createby jpavel (Sexton) |
on Jul 09, 2004 at 16:02 UTC ( [id://373184]=perlquestion: print w/replies, xml ) | Need Help?? |
jpavel has asked for the wisdom of the Perl Monks concerning the following question:
Gracious Monks - I've tired of the monotony of transferring files and node-hopping in our complex environment from my WinXP workstation, so I've begun scripting solutions. It's got a Win32::GUI interface (due to Tk conflicts) and am using IPC::Run to interact with plink and pscp (command line SSH/SCP programs). Plink works perfectly; as I began scripting pscp, I've come across an oddity. If the file I want to transfer is not in the directory as the script, IPC::Run fails, citing "caught Bad file descriptor: Win32::Process::Create() at C:/Perl/site/lib/IPC/Run.pm line 2799". The error occurs with the file selection; not even in passing the file to IPC::Run (meaning, if I have a file selected that is not in the directory, IPC::Run's "start" will fail, even if the file reference isn't passed or used by IPC::Run by that point in time). I'm imagining there is some conflict in the packages, but I'm clueless in troubleshooting this, and hoped someone had seen something like it before. Snippets below. To select the file: And the IPC::Run incantation: Is there a conflict in these packages, or am I doing something foolish (besides poorly written code!)?? Thanks in advance...
Back to
Seekers of Perl Wisdom
|
|