[rrd-users] Re: Format problem

Clifton Royston cliftonr at lava.net
Wed Jan 24 01:04:51 MET 2001


On Tue, Jan 23, 2001 at 02:44:57PM -0800, Todd Caine wrote:
> 
> > You can't just execute shell code from Perl by putting it in backquotes.  You
> > need to use the system command, or do the equivalent functions within Perl.
> 
> That is incorrect.  The backquotes cause the expression to be
> interpolated and then executed as a system command.  The collected
> standard output of the command is returned.

That's correct, and please ignore what I wrote.  I must have been
thinking of something when I wrote that, but I have no idea what.  One
of those days.


> system() on the other hand causes perl to do a fork() and exec(). 
> Now the parent waits for the child to finish are returns with the
> exit status of the program as returned by the wait() call.

Depending on what you are doing, this may be preferable (but probably
not in this case where you're trying to get some result off the
standard output and into a Perl variable.)

  -- Clifton

-- 
 Clifton Royston  --  LavaNet Systems Architect --  cliftonr at lava.net
      The named which can be named is not the Eternal named.


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list