in reply to loop problem

Once you've gone through the first time, you're at the end of the file. Try slurping the FH into an array and using that (if it's not too big).

You could probably also use some "if"'s around your regexes

Replies are listed 'Best First'.
Re^2: loop problem
by Limbic~Region (Chancellor) on Jun 14, 2005 at 14:22 UTC
    Transient,
    Try slurping the FH into an array and using that (if it's not too big).

    And if it is too big? I would recommend using tell and seek for the general case and only slurping in the specific case (you know for sure it is a sane thing to do).

    Cheers - L~R