Hello Perl Monks,
Trying to parse an e-mail address vis:
$adr = "User@domain.com";
@ads = split(/@/,$adr);
What I was expecting was to achieve was:
what I get however is:
Aware that @ is a special character I tried various combinations of "\" and "@" as the split argument but alas the result is the same.
As a slightly different approach I tried:
$sub = $adr;
$sub =~ s/@/\@/;
but again this gave $sub = "User.com"
I guess I need to change the syntax somehow to accept the "@" or try a different approach altogether.
Any suggestions gratefully received.
Thanks to everyone who responded for all the help.