Hi David,
try this one.
$title=~s/ *$//;
it does an in-place search for all trailing spaces and replaces them
with nothing.
Gary
On Friday 18 May 2001 5:08 pm, David Merrill wrote:
> Hi,
>
> I'm working on my very first perl application, which is a front end
> to a database for the LDP. I am trying to truncate a string, using:
>
> $title =~ s/\s*$//;
>
> where $title = "The Linux Programmer's Guide "
>
> and it is being truncated after the ' mark. All I want to do is
> remove the trailing spaces from the string. Can someone please help?
>
> TIA,
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000