(my @array) = $_ =~ /(Dut No.*?)Dut No/gsm; print @array;