in reply to How to make only two of three substitutions?
1 while $sql =~ s%(/.*)/%$1%gs; [download]
use Regexp::Keep; # I believe, it will be unnecessary on Perl 5.10 1 while $sql =~ s%/.*\K/%%gs; [download]
Greetings, Janek