in reply to appending to end of string

I must recommend that you look at perlre and perlvar. Specifically the performance hit associated with $& (last match). Also, using $' (text following last match) operator in a substitution doesn't make sense at all (unless your intention is to have everything after copyright appear twice within the resulting string). If you are just dealing with a string that contains "copyright 2003-2004" then please take arthas's advice and get to know the concatenation (.) operator. If you are looking to add ",2005" to "copyright 2003-2004" within a larger string then a substitution is a good solution, but yours isn't at all what you're looking for. When your string is "this is copyright 2003-2004 etc." the results will be "this is copyright 2003-2004 etc. ,2005 2003-2004 etc." Instead, you should use backreferences to determine what you ought to be inserting. For instance:

$_ = "I like the number 4 and I left my dog in the garage last night o +n accident"; # which I did...poor pup :-/ # store "number xx" where xx is a natural number as a # backreference and replace it with itself followed by # s/(?>number \d+)/ as well as the number 7/g; print $_,$/; __DATA__ output: I like the number 4 as well as the number 7 and I left my dog in the g +arage last night

Hope this helps.

UPDATED: Start to respond to a post that has one response that may be not what the OP is looking for, step away to get the dog out of the garage (again!), come back and finish the post, submit, and discover in your absence that two more replies have gone up :-/

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1