in reply to How to get a slice of hash ref that a sub returns.

Hi,
Simple, make it simple...

sub x {return {a => 1, b=> 2, c => 3}} print @{x()}{a,b}
does the job.

Cheers
Leo TheHobbit
GED/CS d? s-:++ a+ C++ UL+++ P+++>+++++ E+ W++ N+ o K? !w O? M V PS+++
PE-- Y+ PPG+ t++ 5? X-- R+ tv+ b+++ DI? D G++ e*(++++) h r++ y+++(*)