in reply to Is there a non-empty error quine in perl?
Is there a list of all possible error messages somewhere? I started to write this quine tester but now I have no idea how to feed it.
use strict; use warnings; use Sysadm::Install qw(tap); my $quine = 'Number found where operator expected at - line 1, near "l +ine 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"; }
UPDATE: Forgot to thank saintmike for Re: Capturing both STDOUT, STDERR and exit status.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there a non-empty error quine in perl?
by Corion (Patriarch) on Mar 09, 2014 at 18:12 UTC | |
|
Re^2: Is there a non-empty error quine in perl?
by kcott (Archbishop) on Mar 09, 2014 at 23:20 UTC |