[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] TPJ Contest Winner



>>On 9/26/96 Chris Nandor wrote:
>>
>>The big winner of the 0th Obfuscated Perl Contest in Vol. 1, Issue 2 of The
>>Perl Journal was Gisle Aas, who wrote a script that would print out the
>>words "The Perl Journal".
>>
>>Here is his code:
>>
>>*_=\$#;$/=q#(.)#;$#=10;$^X=~s|.*/||;$\=chr;$#=gmtime$#;substr($#,$^F#^F
>>*$^F**$^F-1)=al;s$\$/( )\$/\$/$e\$2\u\$^X\$2\$3o\$1r$    && print time
>>
>>
>>Anyway, when run, you indeed get "The Perl Journal" -- if you run it on a
>>UNIX.  If you run it on a Mac, you get "Fre MacPerl Joirnal
>>".  Hmmm ...

On 27 September 96 Richard Rathe added:

>Could the difference be due to the time functions?
>
>From pod/macperl.html:
>
>>VARIA
>>
>>All time related functions measure time in seconds from 1904, not 1970 as
>>in Unix.

I think so. If you replace the line $#=gmtime$# by $#="Thu Jan 1 00:00:10 1970"
you get "The MacPerl Journal". The line $#=10 also needs deleting to avoid
something unprintable at the end -- I don't understand why.

As it stands I get 'Moe MacPerl Fonrbal'. Maybe that's the equivalent in
Norwegian.

Alan Fry