in reply to fork cant support Win32::OLE ?
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: fork cant support Win32::OLE ?
by ikegami (Patriarch) on Feb 10, 2010 at 17:23 UTC | |
|
Re^2: fork cant support Win32::OLE ?
by xiaoyafeng (Deacon) on Feb 10, 2010 at 17:07 UTC | |
|
Re^2: fork cant support Win32::OLE ?
by xiaoyafeng (Deacon) on Feb 10, 2010 at 17:25 UTC | |
by Corion (Patriarch) on Feb 10, 2010 at 17:29 UTC | |
by ikegami (Patriarch) on Feb 10, 2010 at 17:33 UTC |