On May 24, 2004, at 7:46 AM, [EMAIL PROTECTED] wrote:
sub xpto { my %a = map {$_ => undef} (@_); return \%a; }
or
sub xpto { return {map {$_ => undef} (@_)}; }
I'm using this code but shall exist someting clearner without map. Can you
help me?
I find map() to be the ideal solution. That's exactly what it's for.
You could of course always roll your own loop.
What exactly are you trying to fix?
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
