Referencing Perl

This blog is created to share perl resources all round the world and to explore the same.

Location: Chennai, TamilNadu, India

A Computer Freak, interested in programming open source

Wednesday, March 30, 2005

Removing Duplicates from Array

my @array = qw/1 2 3 4 1 2 3 4/;
%temp = ();
for (sort keys %temp) {
print "$_=>$temp{$_}"."\n";


Anonymous Harish.H said...

This Does the Job Easily I Think

@arr = ("1","2","1","1");

@arr2 = grep { !$count{$_}++ } @arr;

print @arr2;

7:08 AM  
Anonymous Anonymous said...

personally im not a huge fan of map in void context. Also if you are going to have a temp hash you might as well squirel it away in a lexical block.

my @deduped = do{ my %dupe; grep !$dupe{$_}++, @hasdupes };


3:57 AM  
Anonymous Anonymous said...

I was going to say the same as demerphq about making your variables lexically-scoped instead of globals. Have you tried running your code with "use strict" and "use warnings"? Do you run -any- of your code with "use strict" and "use warnings"?

As soon as you do, you'll start getting lots of errors. You can get rid of a lot of them (or even all of them) by using "my" in front of your variables. Otherwise, you're giving implicit bad advice to the people who read this page!


5:58 AM  
Anonymous Anonymous said...

I would like to do similar, but instead I want to print the duplicates so that the end user may know what they were.

(rather than remove them)

2:52 AM  
Anonymous Anonymous said...

Prescriotion Drug Yi Quit Smoking - propecia price
However, these symptoms usually do not last long, and disappear when you stop medication.
[url=]cheap propecia online[/url]
Seek immediate medical help if you experience any of these problems.
propecia drug
Propecia - Hair loss treatmentFDA-Approved Medications
No Prescription is Needed
Free Shipping for Bulk Orders
15% Discount on Reorders Buy low cost Propecia (Finasteride) drugs at one of reliable online pharmacies and save big!
Propecia is a popular and effective medicine for treating male pattern hair loss.

2:16 AM  
Anonymous Anonymous said...

I am the sort of guy who loves to taste unused things. Currently I'm fabricating my own photovoltaic panels. I am doing it all by myself without the aid of my men. I am utilizing the internet as the only path to acheive that. I saw a truly amazing website that explains how to build photovoltaic panels and so on. The place explains all the steps needed for solar panel construction.

I'm not really sure about how precise the data given there iz. If some experts over here who have xp with these things can have a peak and give your feedback in the site it will be grand and I would highly treasure it, cause I really take an interest in solar panel construction.

Thanks for reading this. You people are great.

2:53 PM  
Anonymous Anonymous said...

Keep working ,great job!

8:15 AM  
Anonymous Anonymous said...

married and dating [url=]yugioh gx singles[/url] christian dating tip idea nudist nataturist nude dating

1:15 AM  
Anonymous Anonymous said...

symptoms of statin cholesterol medication [url=]pharmacy discounts[/url] vitamin d for low blood calcium psopalen medical preparation
health care design las vegas [url=]omnicef[/url] artifical kidney pan 6 [url=]international health insurance massachusetts[/url]

10:22 AM  
Anonymous Anonymous said...

antifungal tea tree manuka [url=]accutane[/url] cambridge health institute free diet recipe
vitamin supplements and breastfeeding [url=]No prescription online pharmacy[/url] geriatric medicine md jobs denver [url=]tristan heart[/url]

11:02 AM  
Anonymous Anonymous said...

no place like home home health agency tennessee [url=]glucotrol xl[/url] mineral hunting in wyoming marketing union medical center blairsville ga
missouri board of medicine [url=]Order ED discount pack 2[/url] pharmacy online flexeril [url=]heart sound monitor[/url]

1:37 PM  
Anonymous Anonymous said...

fish oil for dosage anti depressant fish oil [url=]aricept[/url] exercise loss walking weight maxillary sinus infection
health and wellness prevention divided in age groups [url=]lopid[/url] medicare prescription plan passed [url=]pain in the left breast[/url]

10:32 PM  
Anonymous Anonymous said...

long island realtor where to get health insurance [url=]sinemet[/url] tooth dental toys for children blood and inventory safety
forums for depression [url=]epivir[/url] market spice tea bulk tea [url=]nightwish sleeping sun[/url]

10:45 PM  
Anonymous Anonymous said...

arizona health sciences [url=]No prescription online pharmacy[/url] dick bergman shoppers food and pharmacy tea cup poodles for sale
canadian medical supply online [url=]cefadroxil[/url] get paxil generic paroxetine for only 149 in the free [url=]newhampshire drug rehabilitation[/url]

9:38 PM  
Anonymous Anonymous said...
[url=]prescription drugs treatment[/url] canadian drugs biafine emulsion [url=]pravastatin sodim[/url]
drug testing in michigan
[url=]pharmacys in aberdeen with minor ailments scheme[/url] how long do certain drugs stay in the body [url=]lower back pain ice relief[/url]
illegal drugs and how they affect you
[url=]davis pharmacy[/url] pharmacy in springfield ohio [url=]Always Health - Free Online Health Information and Articles[/url] pharmacy celecoxib [url=]olmesartan nitrendipine equivalent doses[/url]

2:30 PM  
Anonymous Anonymous said...

maserati automobile inventory search motorcycle racing
[url=]the first automobile[/url] automobile backup lights [url=]pasco county seat florida[/url]
auto immune aarda gov
[url=]indianapolis automobile races[/url] bill of sale document for automobile [url=]manchester pa honda motorcycles[/url]
automobile chemistry pun
[url=]new mercedes suv models[/url] california license for auto mechanics [url=]New car pictures, prices and reviews[/url]

12:12 PM  
Anonymous Anonymous said...

international travel fares new years travel packages
[url=]march warm travel places[/url] gis travel mug [url=]aaa vacation disney package htm[/url]
christmas travel statistics
[url=]portage glacier facts reports travel guides[/url] tours holiday travel [url=]princess cruises home page htm[/url]
canadian student travel health insurance
[url=]name your price travel[/url] dept of state travel warnings [url=]the cat cruises[/url] cheap flights cheapest travel [url=]adventure scotland[/url]
airport stores with foldup travel carts [url=]best day to visit disneyland[/url]
pacific islands with air travel
[url=]air travel limits[/url] excel travel expense sheet [url=]cheapest travel ireland[/url]
[url=]vail ski vacation package[/url] lymphatic pump travel size [url=]tour liechtenstein[/url] travel by train europe [url=]navy flight deck pictures[/url]
air travel to iquitos peru [url=]cruises from norfolk[/url]

2:31 PM  
Anonymous Anonymous said...

tvr automobile computer automobile gauge display
[url=]lynx auto install[/url] sonrise foriegn auto salvage [url=]toyota udt[/url]
dodge tonneau covers
[url=]automobile waxes[/url] automobile zing [url=]rolls royce catalogs[/url]
full auto bb gun plans
[url=]classic automobile classifieds[/url] lease volkswagen tourag atlanta [url=]rolls royce raynesway 01332[/url]

12:12 PM  
Anonymous Anonymous said...

discovery chanel nike basketball shoes team [url=]elegant fashion outlet wedding[/url] most comfortable shoes designer glasses [url=]crepe soled shoes[/url]

9:06 PM  
Anonymous Anonymous said...

winter clothes small children marie antoinette fashion [url=]carolina shoes[/url] buy new balance shoes crochet baby clothes [url=]zoppa shoes[/url]

8:42 PM  
Anonymous Anonymous said...

adult film producer directory
[url=]uk porn videos amateur wife[/url] sexy cock [url=]free gapping ass creampie[/url]
rikku adult game
[url=]hentai factory[/url] adult bogs [url=]bush river md adult bookstore[/url]
online hentai rpg
[url=]sexy shemale blowjob[/url] totally free adult dateing [url=]amateur japanese couple[/url]
bleach hentai gallarys
[url=]cream pies adult site[/url] sexy mind control stories [url=]grocery store blow job[/url]

6:36 PM  
Anonymous Anonymous said...

journey to the center of the earth movie trivia [url=]Iceage[/url] good luck chuck the movie [url=]Lettres D'Iwo Jima[/url]
toronto movie listings [url=]10 Questions for the Dalai Lama[/url] new tyler perry movie [url=]Supersalidos (2CD)[/url]
windows vista watch and burn a movie [url=]Border Lost[/url] cum movie gallery [url=]Aceh - The Black Road[/url]
the wild bunch movie [url=]Sydney White[/url] fucking teen free movie [url=]A Pup Named Scooby Doo (Vol 3)[/url]

8:47 PM  
Anonymous Anonymous said...

beautifeel shoes clothes homemade [url=]bellydancing clothes[/url] porcelain miniature fashionable parisiennes backstage hairdesigner [url=]gas clothes dryers btus[/url]

11:44 PM  
Anonymous Anonymous said...

otc sleeping pills [url=]stress relief[/url] prednisone and cholesterol
hermes herbal tea [url=]maxalt[/url] depression hurst [url= ]milky white breast [/url] step daughtrt saw my penis
samters syndrome remedy [url=]imodium[/url] medical qualifications for pilots
richmond dental clinic sharma british columbia [url=]inderal[/url] prostate massage coax [url= ]normal blood glucose level mmol [/url] medical marijuana side effects

9:11 PM  
Anonymous Anonymous said...

where to buy croc shoes in mexico city rockport shoes home page [url=]etnies skate shoes at zappos[/url] funky maternity clothes mother of the groom fashions [url=]basketball flight nike shoes[/url]

10:04 PM  
Anonymous Anonymous said...

travel feature writing zune travel pack for zune 30gb
[url=]travel scabble[/url] scrabble travel game [url=]airport homes florida[/url]
sunway travel ireland
[url=]flamingo world discount travel[/url] crusises travel packages [url=]travel and tourism awards[/url]
golden horse travel melbourne air travel cuba [url=]new airlines for 2007[/url]

1:30 PM  
Anonymous Anonymous said...

plugged in movie reviws [url=]duel in the sun[/url] century movie novato horror movie tarantulas
jade marcela nyomi marcela lesbian movie [url=]karma confessions and holi[/url] simpons movie dvd donkey punch movie
women of desire movie [url=]beer wars[/url] movie cessna plane crossing the atlantic
movie dvd clubs [url=]the gift[/url] anna sten movie the last outlaw movie
stealth the movie [url=]avalon[/url] headcheese movie movie theaters rockford illinois

4:44 PM  
Anonymous Anonymous said...

ang pagdadalaga ni maximo oliveros movie [url=]fear house[/url] yamagola telugu movie online for free movie roots kunte kinte
vampire movie list [url=]robin hood 70[/url] made in america movie movie future clone
hackers movie [url=]charlie bubbles[/url] britney spears mtv movie awards
long movie thumbs [url=]butch cassidy and the sundance kid[/url] superbad movie desktop backgrounf disclosure the movie
adult movie stars [url=]pluto s blue note[/url] movie rewiew digimon tamers movie

7:47 PM  
Anonymous Anonymous said...

movie download sites [url=]the new adventures of pippi longstocking[/url] thumbnail movie spiderman 2 the movie
cast of jackass the movie [url=]chelsea lately[/url] four seasons movie cinema the movie granny
murderball the movie [url=]the bill[/url] pointe orlando regal movie theater
movie hostile [url=]the good night[/url] when savannah smiles movie peacemaker movie
wiggles movie direct download [url=]full metal jacket[/url] harry potter movie download full synposis on the movie the core

9:22 PM  
Anonymous Anonymous said...

cheap nike air max 90 rkfzltlb cheap nike air max eglocbpj nike air max 1 qwealbiv nike air max 90 ytjsbcld nike air max 95 ohuscfer nike air max toybsdde nike free run pjjajbqs nike store uk nsuurdxb nike uk lknlvtkh

9:39 AM  
Anonymous Anonymous said...

What's Happening i am new to this, I stumbled upon this I've
discovered It absolutely useful and it has helped me out loads.
I'm hoping to give a contribution & aid other customers like its aided me. Good job.

Also visit my site -

7:05 PM  

Post a Comment

<< Home