Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-12-28 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls