How can I get a character at a given index in Perl? July 18, 2023 by Tarik Use substr with length 1 as in: $nth = substr($string, n-1, 1); Also lookup perlmonks for other solutions.