[rrd-users] Re: Format problem

Todd Caine todd_caine at eli.net
Tue Jan 23 23:44:57 MET 2001


> 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.

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.

I don't know exactly what the code looks like so it's hard to say what the problem
could be.  It could be a scoping issue.  Or you could be trying to use backquotes
within double quotes.  I don't see anything wrong with what you have done, besides
wrapping a shell script with Perl.  But that's just my opinion.  =P

If you would like to send more of the code in, I would be willing to take a peek.

Regards,
Todd


--
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