
Chris Charley
User
Nov 29, 2012, 6:04 PM
Post #4 of 5
(4254 views)
|
Re: [testerV] How do I get everything between first and second match?
[In reply to]
|
Can't Post
|
|
Using the double dot, .., operator that rovf mentioned, the code could be as follows.
#!/usr/bin/perl use strict; use warnings; print grep /^startA/ .. /^stopA/, <DATA>; __DATA__ one line startA meat of the data stopA nothing here Documentation for grep is here. Also, here is the documentation for the range (double dot) operator.
|