use strict; use warnings; use Sysadm::Install qw(tap); my $quine = 'Number found where operator expected at - line 1, near "line 1" (Do you need to predeclare line?)'; my($stdout, $stderr, $rc) = tap "perl", "-e", $quine; print "stdout=$stdout\n", "stderr=$stderr\n", "rc=$rc\n"; if( $stdout eq '' and $stderr eq $quine ) { print "Found error quine!\n"; }