in reply to Input Output Question

Take a look at this...
#!/usr/bin/perl use strict; while (<DATA>) { print if ( /^name:\s\w+\s?\w+/ ... /^.*$/ ); } __DATA__ name: John Doe 23 name: Jane Doe 37 test: asdas name: Joe Doe 12

Replies are listed 'Best First'.
Re^2: Input Output Question
by coco (Initiate) on Jul 07, 2009 at 08:09 UTC
    Just looking at this, would you be able to break down exactly what is happening please. Thanks
      Take a look at the Range Operators documentation. This is one technique for grabbing a range of lines.