my $string = 'perl345'; my $tag = substr $string, -3;