Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: first two words-pattern matching

by TilRMan (Friar)
on May 12, 2004 at 06:29 UTC ( [id://352657]=note: print w/replies, xml ) Need Help??


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
    Hey TilRman ..dat was neat!!! thanks

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-18 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found