On 17 Jul 2001, softhome wrote:
> $string = "No sé como quitar los putos spacios";
> and now?
I'm sure there's a more elegant solution, but here's what I would do:
$string = "Cuando bebo demasiada cerveza, mi nombre es 'Sue.'"
$string =~ s/ //g;
(or)
$string =~ s/\s//g;
The first would just ga
javier wrote:
> It sounds a bit stupid but I don't know the way to
> remove white spaces in a
> string.
>
> $string = "No sé como quitar los putos spacios";
> and now?
$string =~ s/ //g;
Here's one way to do it.
=
Dave Hoover
"Twice blessed is help unlooked for." --Tolkien
http://www.redsq
$string =~ s/\s+//g;
matches one or more spaces (\s+), replaces them with nothing (//), repeats
until the string ends (g).
Rob
- Original Message -
From: softhome <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 8:35 PM
Subject: removing white spaces
> Hi people!
Try:
$string =~s/ //g;
That will get rid of all spaces. If you also want to get rid of tabs,
$string =~s/[ \t]//g;
Or you can use a \s instead of \t to also get rid of newlines, carriage
returns and form feeds.
Pete Hanson
source1results.com
-Original Message-
From: softhome [mailto: