On Fri, May 18, 2001 at 12:08:25PM -0400, 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?

I am unable to duplicate your problem:

  [ bayazid ~ ] perl
  $title = "The Linux Programmer's Guide         ";
  $title =~ s/\s*$//;
  print "=>$title<=\n";
  ^D
  =>The Linux Programmer's Guide<=
  [ bayazid ~ ]

Have you read the FAQ?  Please post the actual code causing the problem.

-- 
If you don't look at the fnord, it can't get you.

Reply via email to