#!/usr/bin/perl use strict; use warnings; $|++; my $cmd = 'hello world.bat'; my @cmd_args = qw/ testing testing 1 2 3 /; my $exit_code = system( $cmd, @cmd_args ); print 'exit code from ', $cmd, ' is ', $exit_code, $/; #### echo hello world! echo %1 %2 %3 %4 %5 #### .