for () { chomp; print "$_: all in m8\n" if /.*x.*y.*z.*/; } __DATA__ foo xoo fyo foz xyo fyz xyz