sub aref2list ($) { return @{ $_[0] } } aref2list($hash->{foo,bar}[2]);