develooper Front page | perl.beginners | Postings from December 2002

unique elements in an array...complex data

Thread Next
From:
Ben Crane
Date:
December 2, 2002 03:46
Subject:
unique elements in an array...complex data
Message ID:
20021202114614.85985.qmail@web41113.mail.yahoo.com
Hi,

%arb=();
foreach(@contents)
{
$fnd{$_}=1;

}
@unique=keys %arb;

this gets unique values from an array...but I want to
find unique records BASED on one column!.

e.g. if a CSV contains road_name, road_number, etc.
and I want to just check for unique values for
road_name.

how do i do that, as the contents of the file are
dumped into an array, I don't wanna to parse then and
put them into another array, it seems a waste of time,
but is this the way?

Ben


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About