$_ = "fish.fish.gif"; s/\./\.\./g; s/^(.*)\./$1/s; s/\.\./_/g; print $_, $/;