in reply to How do I execute UNIX commands from a perl script
Nobody mentioned the Shell module that comes standard with Perl. It does some hackery with AUTOLOAD to see if any undefined routines are shell commands. Here are some examples of what it can do quoted from the documentation
#!/usr/bin/perl use Shell; $foo = echo("howdy", "<funny>", "world"); print $foo; $passwd = cat("</etc/passwd"); print $passwd; sub ps; print ps -ww; cp("/etc/passwd", "/tmp/passwd");
HTH
|
|---|