in reply to subroutine()[$x];

my $var = "1:2:3:4:5:6";
my $x = (split(":",$var))[4];