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

Or perhaps:
$num--; $num||= 2; or $num=$num%2 ? 2 : 1;

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