Re: Perl Question

From: Date: Fri, 28 Jun 2002 17:10:36 +0000
Subject: Re: Perl Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104370@lists.php.net to get a copy of this message
There are many easy ways to do this, I would do the following: $newDomain = str_replace('.','-',$domain); easy :) Andrew ----- Original Message ----- From: "Kurth Bemis (List Monkey)" <listmonkey@usaexpress.net> To: <php-general@lists.php.net> Sent: Friday, June 28, 2002 6:12 PM Subject: [PHP] Perl Question > I know that this a PHP list. I need some perl help. > > i need to take all the "." in a web address and make them into "-". > > example > > subdomain.domain.com --> subdomain-domain-com > > get it? > > heres my s/ code....but it doesn't work :-( > > $domain = s/./-/gi; > > ~kurth > > Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer > > "Jedi business, Go back to your drinks" - Anakin Skywalker, AOTC > > kurth@usaexpress.net | http://kurth.hardcrypto.com > PGP key available - http://kurth.hardcrypto.com/pgp > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#104370) next »