Yeah, @data == @table works today, but I'm always worried that someday it will mean "if the contents of @data match the contents of @table. Better to explicitly compare the number of elements, as scalar's behavoir is less likely to change.
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
| [reply] [d/l] |
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.
| [reply] [d/l] |
| [reply] |