Newsgroups: comp.lang.perl
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!ames!haven!uvaarpa!mmdf
From: Barr3y Jaspan <bjaspan@athena.mit.edu>
Subject: Re: Perl-Users Digest #673
Message-ID: <1991Mar31.205115.10270@uvaarpa.Virginia.EDU>
Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System)
Reply-To: bjaspan@athena.mit.edu
Organization: The Internet
Date: Sun, 31 Mar 91 20:51:15 GMT


|> I don't know if this has been hashed over before, but: What is the
|> shortest self-reproducing Perl program?

Well, this one isn't terribly short, and it isn't EXACTLY
self-reproducing, but it certainly has that kind of flavor to it.  By
the way, don't even TRY to run this program with a non-infinite stack.
(Hint: try smaller numbers)

@_ = (90470, 482466756, 285076, 95568296); eval ($hack = 's//($_-- >
0) ? ($perl++) && ($hack) : (print "$perl ") && ($perl = "a") && ($_ =
shift @_) && $hack/ee');

Barr3y Jaspan, bjaspan@mit.edu
Watchmaker Computing



