use strict;
my $str = '0x8DA1937198d1A51d735aa3E57423183888539E48 0x92b7b421992ef490f3b75898ec0e511f1a5c02422819d89719b20362b023ce4f
0x5D9D8F9F0E0E3D6B07C4Fa829Bf0550D5846E6e2 0x4a7657258f0bc1744c32bed405c0b53b5addcf210f8c15a8f69d168b0ccfc492g2
';
my $regex = qr/^\w{42} /mp;
my $subst = '';
my $result = $str =~ s/$regex/$subst/rg;
print "The result of the substitution is' $result\n";
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html