in reply to Re^2: hash first value
in thread hash first value
my %hash = map { @_ = split /,/, $_; $_[0] => $_[1] } @array; my $first_key = (sort keys %hash)[0];
You might not want to code it quite so compactly in a real app, but you should get the gist of it - turn into a hash, then take the first key from sorting the keys.
Is that what you mean?
|
|---|