in reply to IP to hex translator

perl -e "map {printf '%02x'} split '\.', '127.0.0.1'"

Replies are listed 'Best First'.
Re^2: IP to hex translator
by Oleg_T (Initiate) on Sep 18, 2009 at 23:03 UTC
    sorry, perl -e "map {printf '%02x', $_} split '\.', '127.0.0.1'"
Re^2: IP to hex translator
by Oleg_T (Initiate) on Sep 18, 2009 at 23:18 UTC
    perl -e "print unpack('H*', pack('C*', split ('\.', '127.0.0.1')))"
    Or (whithout brackets)
    perl -e "print unpack 'H*', pack 'C*', split '\.', '127.0.0.1'"