mmartin has asked for the wisdom of the Perl Monks concerning the following question:
I assume those are correct since it works from the Command Prompt without needing to add the "perl" keyword...?>ASSOC .pl .pl=Perl >FTYPE Perl Perl="C:\strawberry\perl\bin\perl.exe" "%1" %*
Does anyone know why the Proc::Background command will not run the Perl script without the "perl" keyword before### THIS ONE GIVE AN ERROR: $proc = Proc::Background->new("bg_script.pl $ARG1 $ARG2 $ARG3 $ARG4"); ### ERROR PRINTED: C:\Script_dir\main_script.pl: cannot find absolute location of bg_scri +pt.pl ### IF I INCLUDE THE PATH: $proc = Proc::Background->new("C:\\Script_dir\\bg_script.pl $ARG1 $ARG +2 $ARG3 $ARG4"); ### ERROR PRINTED (*this one is strange): C:\Script_dir\main_script.pl: no executable program located at C:\Scri +pt_dir\bg_script.pl ### THIS ONE WORKS: $proc = Proc::Background->new("perl bg_script.pl $ARG1 $ARG2 $ARG3 $AR +G4");
### Backticks --- *THIS ONE WORKS: `bg_script.pl $ARG1 $ARG2 $ARG3 $ARG4` ### system() --- *THIS ALSO WORKS: system("bg_script.pl $ARG1 $ARG2 $ARG3 $ARG4");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Proc::Background and Win32
by Corion (Patriarch) on Oct 18, 2013 at 17:21 UTC | |
by mmartin (Monk) on Oct 18, 2013 at 17:56 UTC | |
|
Re: Using Proc::Background and Win32
by dasgar (Priest) on Oct 18, 2013 at 18:03 UTC | |
by mmartin (Monk) on Oct 18, 2013 at 18:56 UTC | |
|
Re: Using Proc::Background and Win32
by BrowserUk (Patriarch) on Oct 18, 2013 at 18:10 UTC | |
by mmartin (Monk) on Oct 18, 2013 at 19:07 UTC | |
by BrowserUk (Patriarch) on Oct 18, 2013 at 19:22 UTC | |
by mmartin (Monk) on Oct 18, 2013 at 19:44 UTC | |
|
Re: Using Proc::Background and Win32
by mmartin (Monk) on Oct 18, 2013 at 19:35 UTC | |
by BrowserUk (Patriarch) on Oct 18, 2013 at 19:55 UTC | |
by mmartin (Monk) on Oct 18, 2013 at 21:19 UTC | |
by BrowserUk (Patriarch) on Oct 18, 2013 at 21:36 UTC | |
by mmartin (Monk) on Oct 18, 2013 at 22:02 UTC | |
| |
|
Re: Using Proc::Background and Win32
by mmartin (Monk) on Oct 24, 2013 at 14:50 UTC |