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

Re: trailing spaces

Thread Previous | Thread Next
From:
James Taylor
Date:
August 20, 2003 17:08
Subject:
Re: trailing spaces
Message ID:
Marcel-1.53-0820225841-06cfNdQ@nospam.demon.co.uk
On Wed 20 Aug, Colin Foster wrote:
> 
> Is there an easy way to remove the trailing
> spaces in the string "TRAILING SPACES     "

Hmmm, I'm not sure whether to give you a fish or a fishing rod.
The fish is:

    $string =~ s/ +$//;

But, more usefully, the fishing rod is:

    Learning Perl, 3rd edition
    http://www.oreilly.com/catalog/lperl3/

or:

    The site for people learning Perl
    http://learn.perl.org/

or even:

    Online Perl documentation
    http://www.perldoc.com/

-- 
James Taylor, Cheltenham, Gloucestershire, UK.       PGP key: 3FBE1BF9


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