You are splitting the data into an array. You have already told us that you know the field you want is the eighth. You can access any element of the array you want via
$foo[n] where
n is the index of the field you want. Since arrays start counting at 0 ( normally at least, it can be changed but I am going to assume you haven't ), the eigth element can be gotten at index 7 --
my $id = $temp[7].
Is that enough?