http://qs321.pair.com?node_id=916066


in reply to Perl Calling Perl! :P

One thing to be careful of when running Perl scripts from Perl on Windows (or any other similar language from Windows) is that file association is only done by a shell, like cmd.exe or Windows Explorer. So, if you call system('myscript.pl'); then it probably won't work, since perl will not invoke a shell which it considers unnecessary.

There are several solutions. The simplest is just system('perl myscript.pl'); but that assumes that %path% is set correctly. You could specifically invoke cmd.exe, or, to take an extreme, use Win32::FetchCommand which will do the registry lookup required for file association.

UNIX style operating systems don't have this issue because of the #! line.