Been working on this one for a while, and I finally think it's decent enough to share...
#!/usr/bin/perl ++vec$\,$,+=y...c,1for+split/\W+/,+q;s/__*/pop/ge,@qq[11*$_-&_]|=\12-& +_,sub _{ $_[(push@{$qq[@_]},$_[unshift(@___,shift),1],\010)]=&{_ x@qq},y._1..d> +3?_:$qq[ 0]=$ARGV[$qq[-1]]}1+while$qq[2]<11||do{pop@_ for@___[0..2]}&unshift re +verse@qq [@qq]&&__.&___,_,sub ___{@_[$_]=eval q+do$0||sprintf'%01e2ld',$qq[_?11 +:shift@_ ],do$0+,push@_,$qq[-1]+tr._1..c}$qq[&__]=&___+1 for(@___)x$_,$ARGV[-1] +or eval+ qq;;;print

-- Mike

--
just,my${.02}

Replies are listed 'Best First'.
Re: The importance of underscores
by diotalevi (Canon) on Mar 25, 2003 at 18:28 UTC

    There is no output. ActiveState 5.6.1 build 633.

    [Added split /\W+/ splits the entire string which ends just before the print() at the end. Each element of the result from split() is a fragment of text that appears to be perl code but really isn't. The y...c fragment adds the string length to the $, length which is used as the offset parameter to the vec function.

    Each part of the input is an incremental offset to a bitstring being built up by vec in $\. The actual bits are being set by using vec as an lvalue via the ++ operator.

    The lone print at the bottom outputs nothing followed by the output record separator $\ which just happens to include the desired text.

    Bravo! That was a very clever expression.]

      Ack! I only tested with 5.6.1 and 5.8.0 on Linux. Thanks for the praise, and good job with the deconstruction.

      -- Mike

      --
      just,my${.02}