{ $/ = undef; my $data = ; my @array = $data =~ /First line of text[\n]second line of text[\n]in the third line I have (\d*\.\d*)/g; for (@array) { print "Captured $_\n"; } }