The real, classic mistake is looking at the outputs and finding them wrong, but not looking at the input, not testing it in the debugger or playing with it in an interactive session.
You weren't getting the results you wanted in @ads, but never verified what you started with in $ads. If the data is wrong, a correct split will not produce the expected results.
You might have used the debugger to interact with your program: perl -d ads.pl. You can also start up the debugger without a program, to experiment with commands: perl -demo. ( Actually it should be perl -de 0, but what you give after the -e doesn't matter, and demo is rememberable.)
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In reply to Re: Parsing an email address
by TomDLux
in thread Parsing an email address
by gitano
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |