in reply to meaning of the following array

This is valid if $seq is a reference to an (anounymous) array. This operation dereferences the reference.
my @seq = ( 1 .. 5 ); my $seq = \@seq; # $seq is now a reference/pointer to @seq my @query = @$seq; # @query is now a copy

my $seq = [ 1 .. 5 ]; # anonymous list my @query = @$seq; # @query is now ( 1 .. 5 )

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: meaning of the following array
by davorg (Chancellor) on Feb 02, 2007 at 08:54 UTC
      I would think that's why the "anonymous" part was in brackets?
Re^2: meaning of the following array
by parv (Parson) on Feb 02, 2007 at 07:42 UTC
    my $seq = [ 1 .. 5 ]; # anonymous list

    [ 1 .. 5 ] is anonymous array reference, not anonymous list.