any input or pointers are welcome.$/ = ""; #set to paragraph mode while(<$file>){ if ($_ =~ /$first_match/ && $_ =~ /$second_match/ && $_ =~ /$third +_match/){ print "$_\n"; my ($needed_data_0) = (/^data_here(.+)/, $_); my ($needed_data_1) = (/^more_data(.+)/, $_); my ($needed_data_2) = (/^other_data(.+)/, $_); print "data0 is: $needed_data_0\n"; print "data1 is: $needed_data_1\n"; print "data2 is: $needed_data_2"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: read file a paragraph at a time and return paragraph OR get specific data from paragraph
by GrandFather (Saint) on Nov 03, 2014 at 00:19 UTC | |
|
Re: read file a paragraph at a time and return paragraph OR get specific data from paragraph
by AnomalousMonk (Archbishop) on Nov 03, 2014 at 04:53 UTC | |
|
Re: read file a paragraph at a time and return paragraph OR get specific data from paragraph
by GotToBTru (Prior) on Nov 03, 2014 at 00:00 UTC |