in reply to Pass anonymous hash - keys only?
update Added link to Perl FAQ 6.#!/usr/bin/perl -w use strict; sub get_ids { my $hashref = shift; print map {"$_\n"} keys %$hashref; # or, depending on your tastes # print "$_\n" for keys %$hashref; } get_ids( {map {$_,1} qw(one two three)} );
_ _ _ _ (_|| | |(_|>< _|
|
|---|