perl -Mstrict -wE '
my $str = "GAGAACATTAGTGGGTGCAGCGCACAAGCATGGCACATGTATACGTATGTAA";
say sprintf q{%s is last found at pos %s}, $_, rindex( $str, $_ ) for qw/A C G T/;
'
####
A is last found at pos 51
C is last found at pos 43
G is last found at pos 48
T is last found at pos 49
####
perl -Mstrict -wE '
my $str = "GAGAACATTAGTGGGTGCAGCGCACAAGCATGGCACATGTATACGTATGTAA";
say rindex( $str, [ATCG] )
'
####
Bareword "ATCG" not allowed while "strict subs" in use at -e line 3.
Execution of -e aborted due to compilation errors.