use warnings; use strict; my $str = "12345678"; my @col = split //, $str; #not / / print $col[3], "\n"; #zero based $str =~ /.{3}(.)/; print $1;