Need help take out few text in perl

I have perl program and I know that while sending an e-mail the following code returns "Remote (/opt/seasoft/db/nervecenter.nms00tst1):"
in an email, I need to take out the entire "opt/seasoft/db/nervecenter" and leave with "ms00tst1" only. How do I do it:

So the output would be "Remote (nms00tst1)"

$email_msg .= "Remote (".$server->[3]."):\n";

Thanks.,

I'm not sure I understand your request, but here's a first attempt.

my $remote = $server->[3];
$remote =~ s%.*\.%%;  # Remove up to first dot
$email_msg .= "Remote ($remote):\n";

If you want to remove the n after the dot too, I'm sure you can figure that part out.

$$server->[3] will return (/opt/seasoft/db/nervecenter.nms00tst1)
(This path is hardcoded)

But the email return the entire path (/opt/seasoft/db/nervecenter.nms00tst1)

I need to return only "Remote (nms00tst1)."

Thanks.

And for some reason you didn't try the code I posted?

vnix$ perl -le '$server->[3] = "/opt/seasoft/db/nervecenter.nms00tst1";
> my $remote = $server->[3]; $remote =~ s%.*\.%%; $email_msg .= "Remote ($remote):\n";
> print $email_msg'
Remote (nms00tst1):
vnix$