Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 contemplating the Monastery: (4)
As of 2015-07-06 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls