in reply to Re: modifying the search pattern of a file.
in thread modifying the search pattern of a file.

I don't want to be picky, but shouldn't:

$num = $num == 1 ? 1 : 2;

be:

$num = $num == 1 ? 2 : 1;

?

Replies are listed 'Best First'.
RE: RE: Re: modifying the search pattern of a file.
by turnstep (Parson) on Jul 13, 2000 at 22:15 UTC
    Or perhaps:
    $num--; $num||= 2; or $num=$num%2 ? 2 : 1;

    Shamefully, --$num||=2; is not allowed.

RE: RE: Re: modifying the search pattern of a file.
by le (Friar) on Jul 13, 2000 at 15:35 UTC
    Of course, sorry... I was in a hurry.