use v5.12; use strict; use warnings; my @cp_ints = map{ eval join '..', split } ; my @cp_hexes = map sprintf( "%#x", $_ ), @cp_ints; __DATA__ 160 191 215 215 230 231 240 240 247 248 295 295 305 305