Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: extract whole sentence after a match of a word

by hipowls (Curate)
on Feb 26, 2008 at 12:17 UTC ( [id://670283]=note: print w/replies, xml ) Need Help??


in reply to extract whole sentence after a match of a word

Not quite sure what you are asking since your data isn't formatted, put <code> and </code> tags around the data and it will appear as you expect.

I'll guess that you want to collect whole lines that have a certain word

my @lines; while ( my $line = <$input_fh> ) { push @lines, $line if $line =~ /WORD/; }
If this wasn't your question then, if you reformat your data and explain where I was wrong, we will be better able to help.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found