in reply to Re: references hashes arrays fun ... again :-(
in thread references hashes arrays fun ... again :-(

The difference between

$rec->{'path_details'} = [ @path_details ];

and

$rec->{'path_details'} = \@path_details;

is that the first one creates a copy of @path_details and returns the reference to this new copy, whilst the second one returns a reference to the original @path_details.

This has nothing to do with context.

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

Perl Training in the UK <http://www.iterative-software.com>