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

Re: [MacPerl] TPJ Contest Winner



>>*_=\$#;$/=q#(.)#;$#=10;$^X=~s|.*/||;$\=chr;$#=gmtime$#;substr($#,$^F#^F
>>*$^F**$^F-1)=al;s$\$/( )\$/\$/$e\$2\u\$^X\$2\$3o\$1r$    && print time

Oops. I said yesterday "The line $#=10 also needs deleting to avoid
something unprintable at the end -- I don't understand why."

Of course it's obvious. The sequence <*_=\$#; $#=10; $\=chr> sets the input
record separator to ASCII 10, the Unix line feed character. To fully Macify
this fascinating obfuscation one should replace '$#=10' by '$#=13'.

This is by the way, but playing with this puzzle I found the following:

        gmtime(0) ->    Mon Feb  6 05:28:16 2040
        localtime(0) -> Fri Jan  1 00:00:00 1904

Does anyone else get this I wonder?

Alan Fry