in reply to Regular Expression and backquoted cmds

Does a backquoted command automatically get output to stdout as well as into the string $result?

No. You can't have the cake, and eat it too.

BTW, stderr is caught as well.

$result=`cat $file | anotherscript.pl`;
I think this gives you a nomination for the Useless Use Of Cat Award ;-) But from the Perl side, you might consider to assign to @result, not $result, because this spares you from using split afterwards. But don't forget to chomp the lines afterwards. You might also consider something like this:
# Note: Code untested! my @none=grep { chomp; /NONE$/ } qx(anotherscript.pl <$file);

And don't forget to use strict and warnings....

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^2: Regular Expression and backquoted cmds
by JavaFan (Canon) on Feb 03, 2009 at 11:57 UTC
    BTW, stderr is caught as well.
    No, it's not:
    perl -E '$r = `perl -E"warn qq[Hello]; print qq[world]"`; say "!$r!"' Hello at -e line 1. !world! $
    As you can see, STDERR of the called process is *NOT* caught, only its STDOUT.
      BTW, stderr is caught as well.
      No, it's not:

      You are right. My mistake! Bad mistake! Sorry!

      -- 
      Ronald Fischer <ynnor@mm.st>