Hello again

Tony Bowden tony at kasei.com
Tue Jan 29 05:43:30 CST 2002


On Tue, Jan 29, 2002 at 11:28:19AM +0000, Stray Toaster wrote:
> > say i have a url:  http://www.terrential.com/ecards/ecard.pl
> > is there anyway that i can get the www.terrential.com bit on its own thru
> > some sort of reg exp??
 
> use Apache;
> my $r = Apache->request;
> my $hn = $r->hostname;

This only works for a tiny subset of problems that the question may have
been addressing ... (consider if the question had started "A user has
entered the url of their homepage into a form ...")

Tony




More information about the Belfast-pm mailing list