in reply to Re: pattern matching
in thread Creating a regex to match part of a URL's domain name (was: pattern matching)
sub getd { my $string = @_; my $wanted; my $domain; ($domain) = split '/', $string; $wanted = (split /\./, $domain)[-2]; return $wanted; } my $variable = "www.google.com"; print &getd($variable); # this is line 29.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: pattern matching
by japhy (Canon) on Jun 06, 2001 at 19:55 UTC | |
by strfry() (Monk) on Jun 06, 2001 at 20:15 UTC | |
by japhy (Canon) on Jun 06, 2001 at 20:26 UTC | |
by strfry() (Monk) on Jun 06, 2001 at 20:55 UTC | |
by strfry() (Monk) on Jun 06, 2001 at 21:06 UTC | |
by strfry() (Monk) on Jun 06, 2001 at 21:21 UTC |