Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: trouble regexing the next line

by Kenosis (Priest)
on Jul 28, 2012 at 15:20 UTC ( #984208=note: print w/ replies, xml ) Need Help??

in reply to trouble regexing the next line

If you use Tie::File;, you can tie the file to an array, and then iterate over the array's elements (i.e., the file's lines) using something like for(my $i = 0; $i < scalar @array; $i++){ ... }, looking for a pattern match in each $array[$i], where $array[$i+1] would be the next line in the file (provided $i+1 < scalar @array).

Comment on Re: trouble regexing the next line
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2015-11-30 10:12 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (769 votes), past polls