but I tried it and it didn't work
Sure it does:
use strict; use warnings; use Test::More tests => 1; my $db = 'a_foo_b'; my $dbname = 'bar'; $db =~ s/_.+?_/_${dbname}_/; is $db, 'a_bar_b';
Update: I see from your reply that you had already figured that out. Apologies!
🦛
In reply to Re^5: Dereferencing in blessed object
by hippo
in thread Dereferencing in blessed object
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |