develooper Front page | perl.beginners | Postings from January 2002

Greedy 'split' ???

Thread Next
From:
Scott Lutz
Date:
January 16, 2002 15:57
Subject:
Greedy 'split' ???
Message ID:
71F9B21D7882714CBC2AC8B44711F2D305E8AD@backup.intranet.pacific.ca

$DOM_NAME, my $TLD) = split(/\./, $domain);
creates two variable out of an inputted domain name, 

until this comes along:
	domainname.org.uk

which it interprets as : 
	$DOM_NAME = domainname
	$TLD = org

so is it possible to do a 'greedy split' ??


Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About