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

Re: writing all the strings between two particular substrings

by bichonfrise74 (Vicar)
on Oct 28, 2009 at 17:20 UTC ( #803732=note: print w/replies, xml ) Need Help??


in reply to writing all the strings between two particular substrings

I think you can use a flip-flop operator.
#!/usr/bin/perl use strict; while (<DATA>) { print if ( /^input/ ... /\;/ ); } __DATA__ input CK, n3065gat, n3066gat, n3067gat, n3068gat, n3069gat, n3070gat, n3100gat, test_si, test_se; output n3104gat, n3105gat, n3106gat, n3107gat, n3108gat, n3109gat, n3110gat; input CK, n3065gat, n3066gat, n3067gat, n3068gat, n3069gat, n3070gat; [jcua@jcua tmp]$ perl 501.pl input CK, n3065gat, n3066gat, n3067gat, n3068gat, n3069gat, n3070gat, n3100gat, test_si, test_se; input CK, n3065gat, n3066gat, n3067gat, n3068gat, n3069gat, n3070gat;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803732]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-04-21 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?