Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Remove duplicates

by choroba (Canon)
on Nov 15, 2012 at 09:21 UTC ( #1003976=note: print w/ replies, xml ) Need Help??


in reply to Remove duplicates

Use strict. $temp_page is different from %temp_page.

You can use uniq from List::MoreUtils. Or, make your own:

sub uniq { my %tmp; undef @tmp{@_}; return keys %tmp; } my (@Category_Link) = uniq($main_page =~ m!<a href="http://www.testsite.co.uk/itm/(.+? +)"!sg);
Update: Usage line added.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Remove duplicates
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2015-07-30 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls