#! /usr/bin/perl -w use strict; use warnings; while () { if (/^If(f?)\b/) { if ($1) { print "found Iff\n"; } else { print "found If\n"; } } else { print "no If\n"; } } __DATA__ If and only iff Iff this were the end the end last If Iffy code or what