#!/usr/bin/perl -w

#use strict;

my $line = "He is out with Barney.He is really happy";
print "\n$line\n";

#test =~ s
$line =~ s/Barney/Fred/;
print "\n$line\n";

$line =~ s/Barney/Wilma/;
print "\n$line -- note nothing happend\n";


#make two copy for $line for more tests
my $line1 = $line;
my $line2 = $line;

$line1 =~ s/He/She/;
print "\n$line1 -- note this is without g flag\n";

$line2 =~ s/He/She/g;
print "\n$line2 -- note this is with g flag\n";

