Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Extract individual lines and block of text from large files

by tangent (Vicar)
on Apr 06, 2016 at 21:39 UTC ( #1159764=note: print w/replies, xml ) Need Help??


in reply to Extract individual lines and block of text from large files

You could add an inner loop:
{ $htm = join('',$1,$2,$3,$4); while ( my $htm_line = <$FH_IN> ) { last if $htm_line =~ m/^\s*<\/DOCUMENT>/i; $htm .= $htm_line; } }
Note that you need to escape the '/' in the DOCUMENT tag.

Replies are listed 'Best First'.
Re^2: Extract individual lines and block of text from large files
by wrkrbeee (Scribe) on Apr 06, 2016 at 21:45 UTC
    Thank you!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-05-29 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?