#!/usr/bin/perl -w ####################################################### # class6_01_patt1 # # using simple patterns --- see which lines passed to # it contain the string 'perl' within them, and display them # to the screen. # # modified by Sharon Tuttle from "Learning Perl", # by Schartz and Phoenix # # last modified: 4-28-03 ####################################################### while (<>) { chomp; # see if $_ contains the letters 'perl' within it if (/perl/) { printf "PERL LINE:<%s>\n", $_; } } # end of class6_01_patt1