I want to call a perl script from inside another perl script, but everytime I run it, a cmd window pops up, even if I close all the I/O handles. Is there any way to avoid the cmd window to popup in perl? I want to avoid annoying windows to be more user friendly.

I'm using Windows XP.

Any ideas are appreciated...

I want to call a perl script from inside another perl script, but everytime I run it, a cmd window pops up, even if I close all the I/O handles. Is there any way to avoid the cmd window to popup in perl? I want to avoid annoying windows to be more user friendly.

I'm using Windows XP.

Any ideas are appreciated...

I also have this problem and can't find the solution anywhere. I had this problem previously when launching VB scripts, and it was solved by running the command "cscript //h:wscript" in a cmd window once. I haven't found a way to do something similiar with Perl. It seems so far, that the supposed "language independent" windows scripting host works well only with scripting languages invented by Microsoft :-(
I hope I am wrong and that someone could correct me.

If you do find the solution, please share as I'm sure many others have the same issue.

I want to call a perl script from inside another perl script, but everytime I run it, a cmd window pops up, even if I close all the I/O handles. Is there any way to avoid the cmd window to popup in perl? I want to avoid annoying windows to be more user friendly.

I'm using Windows XP.

Any ideas are appreciated...

How are you calling a perl script from inside another perl script?
If you are using system() to call another perl script, then you are likely to get another window(as explained by you).

If you are doing the same thing same as my guess, you can try this,

open(F, 'prog.pl');           # assume this is a perl script
while(<F>){
	$str .= $_;             # read complete script into one scalar
}

eval($str);                     # execute your script
# you can even get access to the results

I dont know how far this solution is good. But you can try...

Hope this helps.

katharnakh.

This article has been dead for over six months. Start a new discussion instead.