in reply to Problems with sending value to system command

The builtin system does not return the text that the called program writes to standard output. For that you should use the backtick operator (``). But I have a question for you. Why call one Perl program from another as a separate process? Why not just modify the called program to have a subroutine return a value instead of printing it out and then make it a module?

Replies are listed 'Best First'.
Re^2: Problems with sending value to system command
by EchoAngel (Pilgrim) on Dec 04, 2004 at 03:02 UTC
    i tried using the backtick operator. the problem is that when the system command is called, the script doesn't operator and dies
      You can't combine system() and the backtick operator. Try
      my $outputValueFromFindArcsScript = `/proj/dance.pl '$returnvalue'` if + (length($function) > 0);