in reply to regex to match a literal dot near end of string

i'm not willing to speculate about your gonads, but how about this code:
sub new_filename { my ($name,$platform) = @_; $name =~ s/(\.[^.]+)$/$platform$1/ or die "$name is an invalid patch name"; $name; }