Which are the plus and minuses of executing a Windows batch with system or with exec?
Pluses and minuses as compared to what? Since you apparently want your Perl script to continue running, you want system, not exec. Even though it's been a while since I used it on Windows, system should return even if the batch file blows up, then you'll need to inspect the return codes as per its documentation. Or, to make your life easier, use a module like IPC::System::Simple, which has nicer error handling built in.
When coded with portability in mind, such as using the right modules (like File::Spec or similar for filename handling), Perl is quite portable. For platform-specific notes see perlport (also perlwin32 might contain some useful hints).
In reply to Re: Best ways to run a windows batch with Perl
by Anonymous Monk
in thread Best ways to run a windows batch with Perl
by luxAeterna
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |