Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Understaing Win32::Process::Create
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 23rd October 19:42
miketaylorsf
External User
 
Posts: 1
Default Understaing Win32::Process::Create



I am trying to use a perl program to spawn about 10 other perl
programs. I was using the Win32::Process module with no sucess. I
was creating the process using the following syntax:

Win32::Process::Create($proc,"logs.pl","host1.txt" ,0,NORMAL_PRIORITY_CLASS
| CREATE_NEW_CONSOLE, ".");

That would not spawn anything.

I looked online and found this example and edited it slightly and it
worked:

Win32::Process::Create($proc,$^X,"logs.pl",0,NORMA L_PRIORITY_CLASS |
CREATE_NEW_CONSOLE, ".");

My question is what is the $^X part? I can't figure out what that is
doing. Also, if I use the $^X I can't see to pass command line
options to the program.

Any ideas?

Thanks,

Mike
  Reply With Quote


 


2 23rd October 19:43
yf110
External User
 
Posts: 1
Default Understaing Win32::Process::Create



: programs. I was using the Win32::Process module with no sucess. I
: was creating the process using the following syntax:

: Win32::Process::Create($proc,"logs.pl","host1.txt" ,0,NORMAL_PRIORITY_CLASS
: | CREATE_NEW_CONSOLE, ".");

: That would not spawn anything.

: I looked online and found this example and edited it slightly and it
: worked:

: Win32::Process::Create($proc,$^X,"logs.pl",0,NORMA L_PRIORITY_CLASS |
: CREATE_NEW_CONSOLE, ".");

: My question is what is the $^X part?

perldoc perlvar

$^X The name that the Perl binary itself was executed
as, from C's argv[0].
  Reply With Quote
Reply


Thread Tools
Display Modes




666