#!/usr/bin/perl -w ####################################################### # class7_02_subst_global # # playing with the s/// operator with /g modifier (s///g) # # modified by Sharon Tuttle from "Learning Perl", # by Schartz and Phoenix # # last modified: 5-2-03 ####################################################### while (<>) { chomp; # substitute the EVERY 'perl' in each line with 'PERL!' s/perl/PERL!/g; printf "NEW VERSION:<%s>\n", $_; } # end of class7_02_subst_global