Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: print line

by bichonfrise74 (Vicar)
on Nov 25, 2009 at 22:02 UTC ( [id://809444]=note: print w/replies, xml ) Need Help??


in reply to print line

Can you try to use this?
#!/usr/bin/perl use strict; local $/ = '{IT}'; while (my $line = <DATA>) { my ($it) = $line =~ /(^\s\d+)/; print "{IT}$it\n" if ! ( $line =~ /{LINE}/ && $line =~ /{IT}/ ) && ( defined( $it) ); } __DATA__ {IT} 343 1 {DATE} 090104 {LINE} LEGISLATORS VISIT SENIOR APARTMENT COMPLEX {TAG} 1lutherridge0104.ART {ID} 234 {IT} 434 2 {DATE} 090104 {LINE} LEGISLATORS VISIT SENIOR APARTMENT COMPLEX

Log In?
Username:
Password:

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

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

    No recent polls found