You need /m
regex switch, which treats $
as end of line (instead of end of string)
$x=~s/\/\/\s+Copyright\s+\d{4}$/Copyright 2008/gm;
And if you want to leave in place everything left from the number, you can use \K
$x =~ s|//\s+Copyright\s+\K\d{4}$|2008|gm;