http://www.perlmonks.org?node_id=82841


in reply to Re: What's vec?
in thread What's vec?

The question was rhetorical :p

Do you have a dbcs? All my JAPH does is reverse the two bit-words of each character.

Or perhaps your $?, $^F or $| don't default as mine do.

try this version with hard coded constants:

#!/usr/bin/perl -w use strict; $_="011291020310415102805081036150812103801030115081"; s/(..)/\\x$1/g;eval"\$_=\"$_\";";print,if($_=join'',map{ chr((vec($_,0,4).vec($_,1,4))+96)}split//)=~s;~; ;g;