while () { chomp; my $out = ''; while ( /([0-9a-f]{2})/gi ) { $out .= ( uc($1) eq 'A7' ) ? "00" : $1; } print "$out\n"; } __DATA__ b58013A7FF