On Fri, May 18, 2001 at 10:38:50AM -0500, John Joseph Trammell wrote:
> 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.

Yep, you're right. I misdiagnosed the problem entirely. What's
*really* happening is the the HTML I'm generating comes out:

<input type=text value='The Linux Programmer's Guide'>

which as you can see, is truncating the contents of the input field.
It's not a perl problem at all. Sorry to bother you.

-- 
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

Staff meeting in the conference room in %d minutes.

Reply via email to