Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: shortest self-reproducing Perl program Message-ID: <1990Mar20.203516.8429@iwarp.intel.com> Date: 20 Mar 90 20:35:16 GMT Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 18 Okay, here's my entry for the shortest self-reproducing Perl program. Any takers for shorter? Any one liners? print<<'E'x 2,"E\n"; print<<'E'x 2,"E\n"; E The program must be fed to an unadorned Perl command 'perl' and produce the output that would make 'perl' look like it has been replaced with 'cat'. The null program is not a valid submission. (I claim it first... :-) $_='5O1v3v5y9)1b7u2q4x1i0e3u2"3S9n5w7s6&7o7h8k1l6k3u3/';s/(.)(.)/pack('C',ord($2)-$1)/eg;print; -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/