Re: Calling a shell from a perl script.

2001-12-26 Thread Michael Fowler
On Sun, Dec 23, 2001 at 07:30:21AM -0800, Peter Cornelius wrote: > With system the output is not redirected for you and the return code goes > to $!. Minor correction: system returns the exit status, and stores that status in $?, not $!. $! will contain the reason for a problem if $? or the retu

RE: Calling a shell from a perl script.

2001-12-23 Thread Jim Conner
As personal preference I do try hard not to use system() calls in my Perl scripts because Perl can do everything itself with built-ins or modules. It's my opinion that while easier in terms of coding a lot of the time using system() calls or back-tics it is harder, albeit most likely not too

RE: Calling a shell from a perl script.

2001-12-23 Thread Peter Cornelius
There are several methods for executing external commands from Perl. The 2 most common would be 'system()' and backticks '``'. You should probably read the 'perldoc -f system' for detailed info. The main difference between backticks and system is where the commands output goes and where the ret

RE: Calling a shell from a perl script.

2001-12-23 Thread Gary Hawkins
ome with a fine recommendation or two about the more proper ways to do things. Till then, backtick to your heart's content. /g > -Original Message- > From: Mark-Nathaniel Weisman [mailto:[EMAIL PROTECTED]] > Sent: Saturday, December 22, 2001 10:32 PM > To: [EMAIL PROTECTED] &

Calling a shell from a perl script.

2001-12-22 Thread Mark-Nathaniel Weisman
-BEGIN PGP SIGNED MESSAGE- Hello all, I'm writing a common gateway interface that will call I need to issue several shell commands. (cp, cd, and cd .., and maybe others). Any assistance would be greatly appreciated. How can a call a shell other than bash. Thank you, Mark-Nathaniel Weis