in reply to Just another Perl hacker

This one liner translates cristian's code from hex:

perl -ne 's/(x)(..)(\\|\")(?{print chr hex $2})//g' filename

Is there a shorter way?

s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Replies are listed 'Best First'.
Re^2: Uncover Hex
by cristian (Hermit) on Mar 22, 2005 at 23:19 UTC
    Yes , is a shorter way. But , my idea. 3 Layer and oposition hex , into the hex (H) code . idea: into the H exist code to decrypt H and finaly Japh in hex. probe change eval to print; Thanks for you comment. It do risk perl comunity

      Thanks for the help. This is simpler.

       perl -pe 's/eval/print/' filename.pl|perl

      Thank you cristian.

      s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
        Yes , exactly.
        $__.= chr hex $_ for split /\\x/,'\x4a\x75\x73\x74\x20\x61\x6e\x6f\x74 +\x68\x65\x72\x20\x50\x65\x72\x6c\x20\x68\x61\x63\x6b\x65\x72\x0a';pri +nt $__; or perl -pe 's/eval/print/' filename.pl|perl|perl
        ja ja ja fun