fork is emulated barely enough for certain use cases. Sharing resources across that emulation, such as Win32::OLE objects, is not implemented and thus does not work. But as you only want to run two programs in parallel anyway, just use system:
system('start "Program 1" perl -w program1.pl') == 0 or die "Couldn't launch program1: $!/$?"; system('start "Program 2" perl -w program2.pl') or die "Couldn't launch program2: $!/$?";
Alternatively, you can use the following form:
system(1,"perl -w program1.pl") or die "Couldn't launch program1: $!/$?";
to launch a program without waiting for it.
Maybe you want to look at WWW::Mechanize and/or WWW::Mechanize::Firefox, which give you more control over what happens?
UpdateFixed quotes, thanks ikegami!
In reply to Re: fork cant support Win32::OLE ?
by Corion
in thread fork cant support Win32::OLE ?
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |