chop will remove the last character from a string, but I wonder if that's really what you want to do.
To remove all of the whitespace from the end of a string, use something like this:
--$string =~ s/\s+$//;
"The first rule of Perl club is you don't talk about Perl club."
In reply to Re: last character in string ?
by davorg
in thread last character in string ?
by rimmern
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |