In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Lucio Crusca) writes:
>However I'm facing a wonderful Courier ESMTP setup that requires me to use
>perl in order to write a filter. And I don't want to use perl. So I could
>use one single perl operator I've found: backticks.
>
>What I need is to call an external executable passing a filename as the only
>argument and then returning its output to the caller of the perl script,
>e.g:
>
>$reply=`myfilter.sh $filename`;
>print $reply;
>
>Is the above code correct for my purpose (assuming $filename is defined)?

Not if myfilter.sh could produce output on STDERR and you want that
captured as well.  In which case:

        $reply = `myfilter.sh $filename 2>&1`;

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to