I'm attempting to perform the equivalent of a simple right trim in Perl using a regex.
I have the value
my $test = '1445:';
$test =~ s/:$//;
That can't be the code you ran because it works.
$ perl -e' my $test = "1445:"; $test =~ s/:$//; print "$test\n"; ' 1445
$test contained in the code you ran was different. Check with
use Data::Dumper; local $Data::Dumper::Useqq = 1; warn(Dumper($test));