Jim said: > >> -----Original Message----- >> From: Gavin Henry [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, August 31, 2004 10:11 AM >> To: [EMAIL PROTECTED] >> Subject: grabbing programs output for logfile >> >> Hi all, >> >> I thought I'd start a new thread for this one: >> >> my $backup = system( $rdiff, @args); >> >> Could I use $backup to write to my logfile? >> >> Gavin. >> > > I think you are asking if $backup will contain the output of your sytem > command? It won't. It will only contain the return code. You want back > ticks > or the the qx operator > > $backup = `$cmd`; > or > $info = qx(ps -ef); > > perldoc -f system > >
Thanks. I actually shouldn't of asked this, as I should have read the docs and the cookbook first. Sorry. > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004 > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>