>But I do agree it would be nice if there were a way to simultaneously >construct and dereference an anonymous array or list, perhaps something >like > @( 1, 2, 3 ) > %( foo => 1, bar => 2 ) >which would be equivalent to > @{[ 1, 2, 3 ]} > %{{ foo => 1, bar => 2 }} >but with perhaps lower overhead. You're working too hard. [ 1, 2, 3 ] { foo => 1, bar => 2 } as in $name = 'foo'; $value = { foo => 1, bar => 2 }->{$name}; Not that I'm claiming this is excessively efficient, but it's already there. One just works on the compiler to be smarter on optimizing. Or the programmer: $table = { foo => 1, bar => 2 }->{$name}; $name = 'foo'; $value = $table->{$name}; --tom
- Re: functions that deal with hash should be more libera Jerrad Pierce
- Re: functions that deal with hash should be more li... Jerrad Pierce
- Re: functions that deal with hash should be mor... Casey R. Tweten
- Re: functions that deal with hash should be mor... John Porter
- Re: functions that deal with hash should be... Tom Christiansen
- Re: functions that deal with hash shoul... John Porter
- Re: functions that deal with hash ... Nathan Torkington
- Re: functions that deal with h... John Porter
- Re: functions that deal wi... Nathan Torkington
- Re: functions that deal wi... Casey R. Tweten
- Re: functions that deal wi... Tom Christiansen
- Re: functions that deal wi... Casey R. Tweten
- Re: functions that deal wi... Tom Christiansen
- Re: functions that deal wi... Nathan Torkington
- Re: functions that deal wi... John Porter