in reply to Re^7: Adding an element to an array
in thread Adding an element to an array

I tried this way because at this point in my code @data is like this:
[ [ "John Doe", "Main Street", "House 1", ], [ "John Doe", "Main Street", "House 1", ], ... ]
I tried this way:
foreach my $row ( @data) { $row = $homes_by_names{$row->[1]}; }
But I am getting this:
Can't use string ("2") as an ARRAY ref while "strict refs" in use at . +..

Replies are listed 'Best First'.
Re^9: Adding an element to an array
by poj (Abbot) on Oct 15, 2015 at 18:33 UTC
    Can't use string ("2") as an ARRAY ref while "strict refs" in use at . ??

    What is the line number in the error message and what is the code on that line ?

    poj