use strict; use warnings; my $cmdline="cmd /c testing.bat AA 1"; my $child_pid=system(1,$cmdline); print "$child_pid\n"; wait; print "Finished\n"; exit;