Barr3y Jaspan <bjaspan@athena.mit.edu> (04/01/91)
|> 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
ziegast@eng.umd.edu (Eric W. Ziegast) (04/01/91)
bjaspan@athena.mit.edu writes: >@_ = (90470, 482466756, 285076, 95568296); eval ($hack = 's//($_-- > >0) ? ($perl++) && ($hack) : (print "$perl ") && ($perl = "a") && ($_ = >shift @_) && $hack/ee'); Sorry, it caused a segmentation fault on my system after eating up the CPU. I assume it's trying to print (in a very obscure way) "Just another Perl hacker,". It appears as though several posters are trying to out-perl others when it comes to printing out the "standard" signature, Just another Perl hacker How about having a contest for the best Perl hack that will print the "standard" perl signature? When run, such a hack should produce the same results as: print "Just another Perl hacker"; "Best" is a relative term. A signature should at least be portable and be as obscure as possible. Conciseness would be a plus. This is just a suggestion and not an open invitation for everyone to post just their hacks. Perhaps someone could moderate enties by e-mail. Is there a Perl guru out there able enough to judge the entries? Eric Ziegast University of Merryland