in reply to foreach problem
The variable you're splitting appears to be a remnant of some earlier operation. Try changing
@thermos = split (/\s+/, $thermos); [download]
@thermos = split (/\s+/, $data_line); [download]