in reply to Splitting a string, Just want to Keep Half
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
|
---|