in reply to anonymous hash versus hash reference and their parallels in arrays

You can't take a reference to a list as there isn't a single 'thing' to take a reference to. You can, however, take a reference to an anonymous array. To mirror your examples using arrays you'd do something like this:

@array = ( 1 .. 10 ); $x = [ 'a' .. 'z' ]; $z = \@array;

$x is a reference to an anonymous array. $z is a reference to an array.

--
<http://www.dave.org.uk>

European Perl Conference - Sept 22/24 2000, ICA, London
<http://www.yapc.org/Europe/>
  • Comment on Re: anonymous hash versus hash reference and their parallels in arrays
  • Download Code