in reply to Re^2: exec, system, or backticks
in thread exec, system, or backticks

I'm not sure what you mean by evaluate. If you mean executed as perl code, how about eval ``:

$ perl -e 'eval `echo print 1+3`'; 4

Otherwise, system will do just fine:

$ perl -e 'system("echo bla > file");' $ cat file bla

Replies are listed 'Best First'.
Re^4: exec, system, or backticks
by tc1364 (Beadle) on Oct 20, 2004 at 17:46 UTC
    What I mean by evaluate is this, the output from the Expect script is sent to a file where the sub ck_results opens the file and checks to determine if the necessary information was collected or not and then closes the file. For example, the Expect asks the other box/server to provide it specific register information so that anaylsis of this information can be done.
      To capture the output, just do:
      my $output = `$swbt_dms $item`;
Re^4: exec, system, or backticks
by tc1364 (Beadle) on Oct 20, 2004 at 18:10 UTC
    Thank you for your help my code was modified as follows: <code> system("$swbt_dms $item > $log/$key"); <code> It work just fine. Thank you again!