Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Extract Block Of Text From Log

by davido (Cardinal)
on Nov 20, 2018 at 22:29 UTC ( #1226082=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    local $/ = 'END OF REPORT';
    while (<DATA>) {
    ...
            print "$line\n" if $line =~ /\*\sparameters after change\s=\*/
    + .. $line =~ /\*\sNRG location\s=/;
        }
    }
    
  2. or download this
    local $/ = 'END OF REPORT';
    while (<DATA>) {
        print "$1\n" if m/(^\*+\sparameters after change\s=\*+\n.+?^\*+\sN
    +RG location\s=\*+$)/ms;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1226082]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2021-05-07 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (83 votes). Check out past polls.

    Notices?