Reputation: 1167
I am not sure what i am doing wrong here. Why the regex block is not matching and substitution is not happening. Please help.
#!usr/bin/perl
use strict;
use warnings;
my $x = << "END";
// @@@ START COPYRIGHT @@@
//
// nth dimesion
//
// Copyright 2007
// nth dimension
// Protected as an unpublished work.
//
// The computer program listings, specifications and documentation
// herein are the property of nth dimension Company,
// L.P., or a third party supplier and shall not be reproduced,
END
$x=~s/\/\/\s+Copyright\s+\d{4}$/Copyright 2008/g;
print "$x\n";
Printing $x prints the same value. Kindly help.
Upvotes: 0
Views: 124