I have this work perl can support 4 hex numbers to swap in another 4 hex
perl -wMstrict -le '
my @bits = unpack "(A1)16", sprintf "%016b", hex shift;
my $bitmap = "D5679123C4EF80AB";
@bits = @bits[ map { hex } split //, $bitmap ];
$"="";
print sprintf "%04X", oct "0b@bits";
' "B455"
Result: CB15
please how can support more bytes like 128 bytes?
and how to use this perl to read the hex from a file.txt ?
thanks in advance.