Next Regular Expression Mastery 61

Avoiding This Disaster

        push @pats, qr/$_/ for 'fo*', 'ba.', 'w+3';
        while (<>) {
          foreach $pat (@pats) {
            print if /$pat/;
          }    
        }


Next Copyright © 2002 M. J. Dominus