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

Re: trailing spaces

Thread Previous | Thread Next
James Taylor
August 20, 2003 17:08
Re: trailing spaces
Message ID:
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


    The site for people learning Perl

or even:

    Online Perl documentation

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About