open(R, filename); while() { $temp .= $_; } close(R); if($temp =~ /Description:(.*)Data:(.*)/s) { $result1 = $1; push (@array1, $result1); $result2 = $2; push (@array2, $result2); }