amit223 has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I am parsing through a bunch of files where I looking for a number occurring after a specific two lines of text and the I need to grab a number and save it to an array. .
open (INF, "$file"); while (<INF>){ if(/First line of text[\n]second line of text[\n]in the third line + I have (\d*\.\d*)/) { push(@array,$1); } }
But it is not working, I tried using “m” after the string for multi-line parsing.
Can you suggest anything?? Thank you, Appreciate any help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: multi-line parsing
by ELISHEVA (Prior) on Mar 31, 2009 at 18:31 UTC | |
Re: multi-line parsing
by Bloodnok (Vicar) on Mar 31, 2009 at 18:32 UTC | |
by amit223 (Initiate) on Mar 31, 2009 at 19:05 UTC | |
Re: multi-line parsing
by jethro (Monsignor) on Mar 31, 2009 at 18:47 UTC | |
Re: multi-line parsing
by CountZero (Bishop) on Mar 31, 2009 at 22:17 UTC | |
Re: multi-line parsing
by Nkuvu (Priest) on Mar 31, 2009 at 18:40 UTC | |
by AnomalousMonk (Archbishop) on Mar 31, 2009 at 21:34 UTC | |
by Nkuvu (Priest) on Mar 31, 2009 at 21:43 UTC |
Back to
Seekers of Perl Wisdom