in reply to extracting variables from regex

My first thought was a bit clunky:

echo 66.218.71.112 | perl -pe 's/([\d]{1,3}(?:\.|$))/sprintf("%X",$1)/ge'
42DA4770

And though I don't think these are the best solutions in the world, they might make you dig into perlrun (I sure had to to come up with these!)

echo 66.218.71.112 | perl -F'\.' -ane 'printf "%X%X%X%x\n",@F'
42DA4770

echo 66.218.71.112 | perl -0056 -ane 'printf "%X",$_'
42DA4770

blyman
setenv EXINIT 'set noai ts=2'