develooper Front page | perl.riscos | Postings from August 2003

Re: trailing spaces

Thread Previous | Thread Next
From:
Andrew Green
Date:
August 20, 2003 14:15
Subject:
Re: trailing spaces
Message ID:
4c2509985bandrew@article7.co.uk
In article <f3b4f7244c.Colin@cjfoster.iosun.co.uk>,
   Colin Foster <colinj@torent.co.uk> wrote:

> Is there an easy way to remove the trailing
> spaces in the string "TRAILING SPACES     "

$string =~ s/ +\Z//;

Cheers,
Andrew.

-- 
                   ::    
      article seven      Andrew Green
 automatic internet      andrew@article7.co.uk | www.article7.co.uk

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About