in reply to Re^2: How to execute dos commands from Perl
in thread How to execute dos commands from Perl

If you want to execute a .bat under Windows, then you need to have a script file that Windows understands.

I suggest that you type: "help start"
to see the options for that to make a more complex Windows .bat file.

To capture the output of a shell command (Windows or not) in Perl in the most simple way, use "backticks".

#!/usr/bin/perl -w use strict; my $result1 = `dir`; print $result1; my $result2 = `dir *.txt`; print $result2;