split is most useful when dealing with a list of items. In this case you only have one (test123), so you should look to regexps instead. The following snippets will do:
$string =~ s/^\("(.*)"\)$/$1/;
# Faster than first.
$string =~ s/^\("//;
$string =~ s/"\)$//;
# Same as previous, less redundant.
s/^\("//, s/"\)$// for $string;
Update: I didn't know the braces needed to be replaced. I'm fixed my snippets. Two following two snippet cann't be fixed:
# You didn't mention an escape mechanism, so I'm
# assuming there's no other quotes in the string.
$string =~ s/"//g;
# I didn't say it was impossible.
$string = (split '"', $string)[1];
|