On Sun, 2003-04-06 at 06:21, Richard Jones wrote:
> Sorry, one more...
> I forgot to have it strip out whitespaces...
> Here you go...
>
> $domain =~ s/^www\.//i; # Kill www. - AFTER THIS LINE add this
> one:
> $domain =~ s/ //i; # Kill the blank spaces (whitespace)
hello,
you can remove whitespaces by doing like this:
$domain =~ s/\s//g;
Use "g" as modifier to find a pattern in a whole string.
To find (and replace) whitespaces "i" as modifier is not
necessary, because the "i" modifier is to _i_gnore the
case of the pattern and a whitespace has no case.
regards,
bernd hilmar
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:37:41 EDT