use strict; use warnings; my $addr = '| Note 00001| FIRST LAST NAME| ADDRESS 1 Interest Rate 5.450000| CITY STATE ZIPCODE| YTD Interest $4,442.64| Total Payment Amount $886.00| Escrow Portion $344.49|'; print "address to parse : \n $addr \n"; $addr =~ s/\|\s{25,}[^|]+//g; # rm spaces left $addr =~ s/(?