in reply to Perl and the magic of the perl compiler

It's a matter of operator precedence1:
$ perl -e 'm/foo/i && print while <>' i was foo i was foo i was fee i was foolish i was foolish ^D $
[1] Update: And, as MeowChow says, a single modifier.

After Compline,
Zaxo