in reply to lines written to stdout by a backtick command

Although the backticks will work. It seems worth pointing out that they are not intended for running an additional perl script, but for collecting the output from a foreign process, e.g.:
my $memout = `chcp`; $memout =~ /(\d+)/; print STDERR "Detected code page $1 ... continuing\n";
Generally, if a piece of perl code should run subordinate to another then it belongs best as a subroutine in a module -- that is to say a module you maintain specifically for your applications, as opposed to a CPAN module.

One world, one people