in reply to File to array and reading back

I think I smell a fish... since when does eq throw a "not numeric?"

perl -e "my $lines1 = 7; my $lines2=8; if ($lines1 eq $lines2) {print +'lines are eq';} else {print 'wtf';}" wtf perl -e "my $lines1 ='foo'; my $lines2='bar'; if ($lines1 eq $lines2) +{print 'lines are eq';} else {print 'wtf';}" wtf perl -e "my $lines1 ='foo'; my $lines2='foo'; if ($lines1 eq $lines2) +{print 'lines are eq';} else {print 'wtf';}" lines are eq

Is there something I'm missing or do the reported (code + error) seem to be misaligned?
Phrased another way, are you sure if($lines1[$_] eq $lines2[$_]) is line 14 -- i.e., the source of the "not numeric"?

Replies are listed 'Best First'.
Re^2: File to array and reading back
by choroba (Cardinal) on Jun 19, 2012 at 14:38 UTC
    It's thrown by a subscript, not eq.
    perl -we '$x["y"]'