I have a table in an array and I am trying to sort it using the following method:
@table_array = sort { $a->[0] <=> $b->[0] } @table_array;
But I get this error:
Can't use string ("5") as an ARRAY ref while "strict refs" in use at
My $table_array[x][0] is a numeric value. I create this table by reading two files and merging them on a common field ($table_array[x][1] to be exact).
I am not able to understand where I have asked the elements to be accessed using string references.
Thanks, Karthick S.