IPC::Run::Win32Process -- deliver nonstandard command lines via IPC::Run.
use File::Spec (); use IPC::Run qw(run); use IPC::Run::Win32Process (); use Win32 (); $find_exe = File::Spec->catfile(Win32::GetFolderPath(Win32::CSIDL_SYSTEM), 'find.exe'); run(IPC::Run::Win32Process->new($ENV{COMSPEC}, q{cmd.exe /c echo ""}), '|', IPC::Run::Win32Process->new($find_exe, q{find_exe """"""}), '>', \$out);
This class facilitates executing Windows programs that don't use standard command line parsing rules. Notable programs having nonstandard rules include cmd.exe, cscript.exe, and Cygwin programs called from non-Cygwin programs. IPC::Run will use the two strings, verbatim, as the lpApplicationName and lpCommandLine arguments of CreateProcessA(). This furnishes unfiltered control over the child process command line.
IPC::Run::Win32Process->new( $lpApplicationName, $lpCommandLine ); IPC::Run::Win32Process->new( $ENV{COMSPEC}, q{cmd.exe /c echo ""} );
Constructor.
To install IPC::Run, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPC::Run
CPAN shell
perl -MCPAN -e shell install IPC::Run
For more information on module installation, please visit the detailed CPAN module installation guide.