use strict; use warnings; while () { next unless /^(?:[0-9a-z]{4})\s+(?:([0-9a-z]{2}\s)){16}/i; my @chars = map hex, /(?<=\s)([0-9a-z]{2})\s/gi; my $str = pack ('C16', @chars); print $str; } __DATA__ Checksum: 0x9681 [incorrect, should be 0x8704 (maybe caused by "TCP checksum offload"?)] Data (59 bytes) 0010 43 3a 5c 4d 4b 53 5c 75 74 72 61 5f 52 65 6c 65 C:\MKS\utra_Rele 0020 61 73 65 34 2e 30 5c 55 74 72 61 5c 75 68 74 5c ase4.0\Utra\uht\ 0030 75 65 75 68 74 2e 63 00 00 00 b0 ueuht.c.... #### C:\MKS\utra_Release4.0\Utra\uht\