in reply to This code is just freaky...

LINE appears to refer to a label, so you could look for a labeled bareblock, 'LINE: {...}' enclosing this line of code.

The effect of while (($line =~ /abcd/o) .. ($line =~ /def/0)) is to skip back to the label (presumably to read another $line) when $line has matched 'abcd' but not yet matched 'def'. I have no idea what the '0' does, but it might be a typo for 'o'.

This construction will fail if abcd-def pairs can nest.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: This code is just freaky...
by DBX (Pilgrim) on Jul 28, 2001 at 03:42 UTC
    I think you are right, the '0' is a typo for 'o', which tells the regex compiler to only compile each regex once for the entire program, not once for every loop iteration.
Re: Re: This code is just freaky...
by cmeyer (Pilgrim) on Aug 01, 2001 at 01:09 UTC
    You might not see an explicit block with the label LINE:, as that is the label given to the implicit loop when perl is called with the -n or -p command line switch. -C.