Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: split and matching

by aaron_baugher (Curate)
on May 07, 2012 at 20:58 UTC ( [id://969333]=note: print w/replies, xml ) Need Help??


in reply to split and matching

I probably wouldn't use perl for this, since it's a straightforward grep task. Maybe this will help you see what you need to do:

grep -v 'sno=;' <infile | grep -v 'tail->tail' | grep -v 'head->head' +>outfile

(Yes, I know those can be combined into a single grep with a more complicated test, but so can they be combined into a single regex in Perl. To me, a pipeline of simple greps is easier to create and to understand later.)

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found