in reply to Splitting a string, Just want to Keep Half

Dru,
It is commonly thought that a valid email address is far more strict than it actually is. I think email addresseses may even contain more than one @ symbol. This would imply using the limit argument in the split. I do believe there are some fairly decent modules on CPAN for email address stuff if this is going to be used for anything other than just casual personal use.

Ok - chances are you didn't need to hear any of that, so an alternative to split would be to use index and substr.

#!/usr/bin/perl -w use strict; my $email = 'joe.snuffy@nowhere.com'; my $domain = substr($email,index($email,'@') + 1); print "Domain is $domain\n";

Cheers - L~R