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
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
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
With tcsh I just use backticks (below the tilde) because it's simple and
reliable and no worry about resources and they are not repetitive tasks and I
don't care if Santa brings me anything. So:
`cp thisfile thatfile`;
bing, done.
Cron for example, a scheduled task, can start the script an