in reply to How to make only two of three substitutions?

Another way, expressing the logic, that the first / mustn't removed, but all others is to say it explizitly.
Assuming the sql statement is one line $sql:
1 while $sql =~ s%(/.*)/%$1%gs;
or with the futuring keep syntax:
use Regexp::Keep; # I believe, it will be unnecessary on Perl 5.10 1 while $sql =~ s%/.*\K/%%gs;

Greetings,
Janek