#!/usr/bin/perl my $string="testing.123"; $string =~ /\.([0-9]+)$/; $result = $1; print "$result\n";