in reply to first two words-pattern matching
use strict; use warnings; open RERUN, "rerunlrg" or die "Can't open rerunlrg: $!"; while (<RERUN>) { next if $. % 2 == 0; # Skip the second, fourth, ... line if (m[(\S+)\s+(\S+)]) { print "Matched: $1 $2\n"; } } close RERUN;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: first two words-pattern matching
by shamala (Acolyte) on May 12, 2004 at 06:46 UTC |