Actually I had that wrong. The basic example I provided does in fact work;
my problem is that I have a string generated by an object method, and that
method automatically places the quotation mark at the end of my string.
That's the quotation mark that I don't know how to remove. I should have
pro
l Message-
> From: Scot Robnett [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 17, 2002 1:32 PM
> To: [EMAIL PROTECTED]
> Subject: Removing the last character from a string
>
>
> How would I remove only the *last* quote from this string?
>
> my $string = qq
How would I remove only the *last* quote from this string?
my $string = qq(one" two" three" four");
The result I am looking for replaces this:
one" two" three" four"
with this:
one" two" three" four
This did not work:
$string =~ s/\"$//; # replace last " w