How to dereference hash references

后端 未结 3 708
难免孤独
难免孤独 2021-01-26 00:05

UPDATE: Everything I know about referencing/dereferencing came from here: http://www.thegeekstuff.com/2010/06/perl-array-reference-examples/

I\'m working with a library

3条回答
  •  故里飘歌
    2021-01-26 01:05

    If @$result is an array then your LHS must be a list. Otherwise $hashref will be assigned the array size.

    my ($hash_ref) = @{ $result};
    print Dump($hash_ref));
    

提交回复
热议问题