in reply to finding and deleting the value of special characters

Another idea might be to use a hash to translate these. Something like this:

$line = 'foo ?&k2S bar ?&13A baz'; %cvt = ( 'k2S' => 'AAA', '13A' => 'BBB', ); $line =~ s/\?\&(...)/$cvt{$1}/g; # prints "foo AAA bar BBB baz" print $line, "\n";

If there's a way of decoding these symbols, you could write a separate routine to create the hash first.