Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: extract a hostname from a fqdn

by rjt (Deacon)
on Mar 23, 2013 at 23:46 UTC ( #1025095=note: print w/ replies, xml ) Need Help??


in reply to extract a hostname from a fqdn

/^ ([^.]+) (?:\.(.+))? $/x; say "Host: `$1', domain: `$2'";


Comment on Re: extract a hostname from a fqdn
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-08-22 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls