in reply to Is there a non-empty error quine in perl?

G'day ambrus,

I believe this is an example of what you're after:

CORE:: is not a keyword at -e line 1.

I checked like this which I think follows all your rules (but do advise if that's not the case).

$ perl -e 'CORE:: is not a keyword at -e line 1. ' 1> /dev/null CORE:: is not a keyword at -e line 1. $

[Note: the newline after "line 1." was to match the newline output to stderr.]

Perl version: v5.18.1 built for darwin-thread-multi-2level

-- Ken

Replies are listed 'Best First'.
Re^2: Is there a non-empty error quine in perl?
by ambrus (Abbot) on Mar 10, 2014 at 06:55 UTC

    Nice trick! Congratulations. And it still works if I modify it to run from the stdin from perl.

    CORE:: is not a keyword at - line 1.
    This works with older versions of perl too, including perl 5.12.3.

      And on:

      $ /bin/perl -v This is perl, v5.8.8 built for msys

      --MidLifeXis

      and on
      # perl -e 'print "$^V\n"' v5.10.1