This should work!
Can you give us a bit more context?
To be precise:

$title = "The Linux Programmer's Guide         ";
$title =~ s/\s*$//;

That works.

If you don't get "The Linux Programmer's Guide" there has to
be something wrong in the code around that bit.

cr



On Fri, 18 May 2001 12:08:25 -0400, David Merrill said:

> 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,
>  
>  -- 
>  Dr. David C. Merrill                     http://www.lupercalia.net
>  Linux Documentation Project                   [EMAIL PROTECTED]
>  Collection Editor & Coordinator            http://www.linuxdoc.org
>                                         Finger me for my public key
>  
>  Your code should be more efficient!
>  

Reply via email to