And now let's see a bit more trickier solution.
$_ = "fish.fish.gif"; s/\./\.\./g; s/^(.*)\./$1/s; s/\.\./_/g; print $_, $/;
In reply to Re: Replace all occurrences but the last
by ambrus
in thread Replace all occurrences but the last
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |