in reply to Syntax error for the following ???

You can't do

my @Aseen{...} = ...;

which is what Perl tells you. Split it up into two steps and Perl will understand you:

my %Aseen; @Aseen{ @a } = ()

Also, why are you copying the values from @$a_ref into @a just to use it to assign to %Aseen ? Why not use them directly for assigning?

@Aseen{ @$a_ref } = ()

Replies are listed 'Best First'.
Re^2: Syntax error for the following ???
by mr_p (Scribe) on Mar 30, 2010 at 18:08 UTC

    Worked. Thanks.

    Don't know how it worked without use strict.

      Also note that in the statement
          (@b,@isec) = ArrayFunctions(\@ArrayA, \@ArrayB, \@b, \@isec);
      the array  @b will consume the entire list returned by the  ArrayFunctions() invocation, leaving  @isec eternally empty. This is due to the 'list flattening' behavior of Perl.

      It doesn't work whether use strict; is used or not.

      $ perl -e'my @Aseen{@a} = ();' syntax error at -e line 1, near "@Aseen{" Execution of -e aborted due to compilation errors.

      You probably added that my at the same time you added use strict;