#!/usr/bin/perl -w

#######################################################
# class6_08_subst1
#
# example of substituion, s///
#
# last modified: 4-28-03
#######################################################

while (<>)
{
    #  let's print lines that contain oil, BUT with
    #  oil changed to PETROLEUM BY-PRODUCT
    #  (note that, in this case, I'm NOT printing other lines)
    if (s/oil/PETROLEUM BY-PRODUCT/) 
    {    
        print $_;
    }
}

# end of class6_08_split_ex
