in reply to Re^3: DBI SQL adding array of values
in thread DBI SQL adding array of values

Your concern is without foundation. The behaviour of the == operator applying a scalar / numeric context to both of its operands is not going to change in perl 5 and will not in perl 6 either. Feel safe in knowing @data == @table is unambiguous and is not going to change on you.

Also, the question of comparing two arrays for equality is more complex than you appear to think. If you'd like to hear more about equality, speak up. In a new SoPW about the different meanings of equality in comparing two arrays. Its a bigger subject than a single response to an unrelated thread merits.

Replies are listed 'Best First'.
Re^5: DBI SQL adding array of values
by radiantmatrix (Parson) on Oct 29, 2004 at 20:30 UTC
    the question of comparing two arrays for equality is more complex than you appear to think
    I am actually well aware of the complexities of testing for equalities in arrays. But I have also used (admittedly archaic) scripting languages where array1 == array2 tested for byte-length equality, or where the same tested equality for all elements. Either of those cases were not what the OP was looking for, but for a "number of elements" comparison.

    It is, however, nice to know that there are no plans to alter the current behavior of @array1 == @array2 in Perl 6; thank you for that nugget.

    radiantmatrix
    require General::Disclaimer;
    "Users are evil. All users are evil. Do not trust them. Perl specifically offers the -T switch because it knows users are evil." - japhy