http://www.perlmonks.org?node_id=1003976


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.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ