in reply to Assign a reference to a non reference
I'm using $_ as a holder for an array ref to the return value.(%baz = %{$_->[0]}), (@bar = @{$_->[1]}) for [&foo()];
Hey, it's one line. No, I can't think of a quick idiom, unless you permit global variables:
But mucking with the symbol table is generally bad form as well.our (%baz, @bar); (*baz, *bar) = &foo();
-- Randal L. Schwartz, Perl hacker
|
|---|