Posted by zenincognito 14 hours ago
$ touch temp.pl; perl temp.pl; echo "exit code $?"
exit code 0
which is a valid perl program. And that one image with the watermark "stitch & shutter" ? $ echo "stitch & shutter" > temp.pl; perl temp.pl; echo "exit code $?"
exit code 0
Also valid perl.I was somewhat pleasantly surprised a few days ago when an LLM out of the blue decided to use perl, not python, for some simple scripting. There is hope in the world yet…
Illegal division by zero at /tmp/quine.pl line 1.
I just tried this perl 5.42.0, and any file name starting with a '/' will work.See also:
https://news.ycombinator.com/item?id=40202182
any file name? How about /1
?
Quite some foresight indeed!