my (undef, undef, $third) = split ",", $foo; #### my $third = (split ",", $foo)[2];