use constant DLE => 0x10; #### my $dle = chr(DLE); $msg =~ /\A$dle[^$dle]/;