in reply to Run multiple shell commands on the same perl script
Hello Daral, and welcome to the Monastery!
As 2teez explained, you can use system to run an external command from within a Perl script. But note that system returns the command’s exit status, not its output. If you want to capture the command’s output, use backticks (or the equivalent qx operator):
my $ls = `ls`;
print "Output from ls:\n\n", $ls, "\n";
my $con = `ipconfig`;
print "Output from ipconfig:\n\n", $con, "\n";
Update: To capture both the output and the exit status, use the CPAN module Capture::Tiny.
Hope that helps,
Athanasius <°(((>< contra mundum