CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Laurent_R] Removal of duplicated element in array with order.: Edit Log



Wazezu
Novice

May 7, 2013, 6:23 AM


Views: 1435
Re: [Laurent_R] Removal of duplicated element in array with order.

thanks, your code works, but when I port your code over to my code, it doesn't work. I guess it is due to the '@' in email addresses causing the issues. I am sorry for my poor porting skills, sincerely. =/

For instance, '@' have to be escaped to work in the code you provided.

Code
my $match = 	"dmit\@sp.com\nnems\@es.com\nndew\@es.com\ndmit\@sp.com";


My code
1. opens a HTML file,
2. extracts email addresses from it to a $ variable,
3. converts it to @ variable
4. and then attempts to remove the duplicated elements.

Perhaps there is some issues in the conversion to arrays like you mentioned earlier.

My modified code with your code in it. ( It has problems with variable scoping, can't find a way to print the $match properly. )
http://pastebay.net/1208653

On a sidenote, I am apologetic for the cross-post if it offends you in any way. I am hoping for more views to solve this issue.Frown


(This post was edited by Wazezu on May 7, 2013, 6:25 AM)


Edit Log:
Post edited by Wazezu (Novice) on May 7, 2013, 6:25 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives