in reply to Re: Re: bin2hex converter
in thread bin2hex converter

Oh, you wanted to play golf? Well, how about:
s/(.{1,4})(?=(?:.{4})*$)/sprintf"%x",eval"0b$1"/eg;

-- Abigail

Replies are listed 'Best First'.
Re^2: bin2hex converter
by Anonymous Monk on Sep 05, 2014 at 12:52 UTC
    ($;,$_,$|,$\)=("Yoo*se\x7F*cd*Mcpk+"," "x17,1,"\r"); {vec($_=>1+$"=>$^F<<$^F)=ord($/^substr$;=>$"=int rand 16=>1); print&&select$,,$,,$,,$|/($|+tr/ //c);redo if y/ //>$^F**2};