in reply to Variable assignment confusion

Just for fun:

my $new_retid = $retid.("_001","")[0+$retid=~/_\d{3}/];

Yeah. Fun stuff.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1