Using the code below works great if STDOUT is the terminal, but when trying to pipe it 
to a file the two system() functions run first and the print() statements run second, 
illustrated below as well.  Anyone have a clue why?

--BEGIN excerpt from code--

    foreach $elem (@test_list)
      {
        print "Test: $elem\n";
        print "Behavioral :\n";
        system 
('/usr/bin/find',"hammer/$test_dir/test/test$elem","-name","behv*.err","-print","-exec","grep","-i","$test_dir/test","{}","\;");
        print "Gates min :\n";
        system '/usr/bin/find',"hammer/$test_dir/test/test$elem","-name", 
"gates_min*.err","-print","-exec","grep","-i","$test_dir/test","{}","\;";
        print "Gates max :\n";
        system '/usr/bin/find',"hammer/$test_dir/test/test$elem","-name", 
"gates_max*.err","-print","-exec","grep","-i","$test_dir/test","{}","\;";
      }

--END excerpt from code--

--BEGIN output of code when piped to a file--

hammer/sync_servo/test/test0/behv_test0_result.err
hammer/sync_servo/test/test0 PASSED
hammer/sync_servo/test/test0/gates_min_test0_result.err
hammer/sync_servo/test/test0 FAILED
hammer/sync_servo/test/test0/gates_max_test0_result.err
hammer/sync_servo/test/test0 FAILED
----------------------------------
Scanning sync_servo error files...  
----------------------------------
Test: 0
Behavioral :
Gates min :
Gates max :

--END output of code when piped to a file--

Regards,
Mike

Michael Burnside 
Research & Development 
Iomega Corporation 
801-332-5484 

- Support bacteria - They're the only culture some people have.

Reply via email to