beeny has asked for the wisdom of the Perl Monks concerning the following question:
Many many thanks from a rapidly balding chap in advance, Beenyif($data[$i] =~ /Message Type: /){ $j=$i+13; #This will not work $k=$i+14; #This will not work @details0=split / /, $data[$i]; @details1=split / /, $data[$j]; @details2=split / /, $data[$k]; $txname=$details0[2]; $txtime=$details2[2]; $errorcode=$details1[2]; print OUT "$txname\t\t\t$txtime\t\t$errorcode\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex to select multiple lines
by pernod (Chaplain) on Dec 09, 2004 at 16:13 UTC | |
by beeny (Initiate) on Dec 09, 2004 at 17:02 UTC | |
|
Re: Regex to select multiple lines
by EdwardG (Vicar) on Dec 09, 2004 at 16:05 UTC | |
|
Re: Regex to select multiple lines
by davorg (Chancellor) on Dec 09, 2004 at 15:49 UTC | |
|
Re: Regex to select multiple lines
by Animator (Hermit) on Dec 09, 2004 at 15:53 UTC | |
by beeny (Initiate) on Dec 09, 2004 at 16:01 UTC | |
by Animator (Hermit) on Dec 09, 2004 at 16:07 UTC |