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

Re: [FWP] Shortening



On Wed, Mar 07, 2001 at 08:59:07PM -0500, Keith Calvert Ivey wrote:
> Robin Houston <robin@kitsite.com> wrote:
> 
> > Some people at MIT have written a CSS descrambler in a
> > short (and rather obfuscated) Perl script. It's at
> > http://www.cs.cmu.edu/~dst/DeCSS/Gallery/qrpff.pl
> > 
> > I wonder how short it could really be made. I can
> > already see a way to shave two bytes from the beginning
> > by using $/=\2048 but I'm sure more subtle contractions
> > are possible.
> 
> I found another way to save two bytes, by replacing each of 
> the 12 occurrences of $_ in the string with ! and then adding 
> s/!/\$_/g; before the eval.  But your replacement removes one 
> occurrence of $_, so the combined savings is only three bytes.


Ah, but if you use:

    s'!'$_'g;

your savings are back to 4 bytes again.



Abigail

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe