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

#!/opt/perl/bin/perl my $domain; $email=q{rajiv.gangadharan@hp.com}; ($domain) = (split /\@/,$email)1; print "Domain is $domain\n"; Just take the first (exclude the 0th element which is the name) element and print it.
  • Comment on Re: Splitting a string, Just want to Keep Half