Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hey Guys,
**** VICTORY **** I know this is old but I was trying to do the exact same thing on Windows XP running Strawberry Perl 5.8.18, and also using the Proc::Background Module. And I was literally on the verge of ripping my hair out one strand at a time..! Seriously! But I was FINALLY able to get Proc::Background to work using Absolute Paths that contain whitespace..! What I had to do was, first define the full path, then convert the Full Path to Windows Short Path to remove the whitespace. Lastly, include "perl" before the script name you want to execute in Proc::Background->new() Function... Like so: Without pre-pending "perl" to the $short_path variable you would get the following error even though it could actually find the Path this time instead of saying its not there for "C:\Program" and stopping at the first occurrence of whitespace. So you would see this without including "perl":
And after I added "perl" to the Proc::Background command I can now execute my script in the background and watch it's progress... So I hope this helps someone out there, cause this was the first link that would show up in Google no matter what search terms I used for describing this problem... So good luck gents...! Thanks, Matt In reply to Re: Proc::Background does not take file path with spaces
by Anonymous Monk
|
|