in reply to Re: simple japh..
in thread simple japh..

How about:

#!/usr/bin/perl -w use strict;@_=("\x4a","\x20","\x50","\x2C");$_="6=6IZ,3AA>&]Z:'=Q,C-W< +6DT,GEW<0 ``";my($m,$b,$o,$e,$_a,$g,$r,$_h,$c,$j_,$k,$f,$d,$p_,$l,$q,$t,$x,$w,$z +);sub _{; my($_f,$_8,$_1)=@_;return(substr($_f,$_8,$_1));}sub __{my($_r,$_j)=@_; +;;return( unpack($_r,$_j));}($t,$x,$m,)=('u','y',2);($o,$b)=(0,4);$_=__($t,$_);s +$j$s$g;;( $c,$d)=(($b+$m),(7-$o));s;z;t;g;$q="\150\141\143\153";s$x$n$g;s$i$l$g; +($k,$l)=( ($b-3),($m+1));s$q$r$g;($g,$f)=(($c*$m),((($d**$m)-($d+$b))/$m));s$w$e +$g;($w,$z )=('\d\d',$_[($o+1)]);s=$w=$z=g;$j_=_($_,$o,$b);$_a=_($_,$b,$d);$p_=_( +$_,$g,$d) ;;$_h=_($_,$f,$c);;$_="$_[$o]$j_$_a$_[$k]$_[$m]$p_$_h$_[$l]";s;$x;$q;g +;print;;;

Update:
(1) Removed example that doesnt use strict/warnings;
(2) Modified current code (cosmetics, some regexes, value of $q, and added one sub).

/renz.
"Call on God, but row away from the rocks."
--Hunter S. Thompson.

Replies are listed 'Best First'.
Re^3: simple japh..
by jdalbec (Deacon) on Feb 25, 2005 at 01:07 UTC
    Not bad at all.++
    #!/usr/bin/perl -w use strict; @_ = ( "\x4a", "\x20", "\x50", "\x2C" ); # ("J", " ", "P", ",") $_ = "6=6IZ,3AA>&]Z:'=Q,C-W<6DT,GEW<0\n``"; my ( $m, $b, $o, $e, $_a, $g, $r, $_h, $c, $j_, $k, $f, $d, $p_, $l, $q, $t, $x, $w, $z ); sub _ { ; my ( $_f, $_8, $_1 ) = @_; return ( substr( $_f, $_8, $_1 ) ); } sub __ { my ( $_r, $_j ) = @_; return ( unpack( $_r, $_j ) ); } ( $t, $x, $m, ) = ( 'u', 'y', 2 ); ( $o, $b ) = ( 0, 4 ); $_ = __( $t, $_ ); # "ujz18axozhwq23wqi42ywq" s$j$s$g; # "usz18axozhwq23wqi42ywq" ( $c, $d ) = ( ( $b + $m ), ( 7 - $o ) ); # ( 6, 7 ) s;z;t;g; # "ust18axothwq23wqi42ywq" $q = "\150\141\143\153"; # "hack" s$x$n$g; # "ust18anothwq23wqi42ywq" s$i$l$g; # "ust18anothwq23wql42ywq" ( $k, $l ) = ( ( $b - 3 ), ( $m + 1 ) ); # ( 1, 3 ) s$q$r$g; # "ust18anothwr23wrl42ywr" ( $g, $f ) = ( ( $c * $m ), ( ( ( $d**$m ) - ( $d + $b ) ) / $m ) ); # + ( 12, 19 ) s$w$e$g; # "ust18another23erl42yer" ( $w, $z ) = ( '\d\d', $_[ ( $o + 1 ) ] ); # ( '\d\d', " " ) s=$w=$z=g; # "ust another erl yer" # 0123456789012345678 $j_ = _( $_, $o, $b ); # "ust " $_a = _( $_, $b, $d ); # "another" $p_ = _( $_, $g, $d ); # "erl yer" $_h = _( $_, $f, $c ); # "" $_ = "$_[$o]$j_$_a$_[$k]$_[$m]$p_$_h$_[$l]"; # "Just another Perl yer, +" s;$x;$q;g; # "Just another Perl hacker," print;