my ($str,$num) = $row->{ID} =~ /(\D+)(\d+)/; my $new_id = lc($str) . int($num);