in reply to Steps to get a substring from a string
Depending on the parts you have already written and the functionality you need, Mozilla::PublicSuffix might help you to determine what is "a domain" and what is "a hostname in a domain".
If your question is only about string manipulation, have you considered using split on a dot and taking the first result?
my @parts = split /\./, $input;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Steps to get a substring from a string
by vinoth.ree (Monsignor) on Jul 21, 2015 at 16:42 UTC | |
by CountZero (Bishop) on Jul 21, 2015 at 17:05 UTC | |
by vinoth.ree (Monsignor) on Jul 21, 2015 at 17:10 UTC |