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