my $day = '1ST'; my $suffix = substr($day, -2, 2, ''); print $day; # "1" print $suffix; # "ST"