http://qs321.pair.com?node_id=1096771

neilwatson has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, This code is producing continuous errors. What have I done wrong?
Use of uninitialized value $i in array element at /home/neil/src/perltest/foo.pl line 25. label kept
#!/usr/bin/perl use strict; use warnings; use feature 'say'; my $aref = [ [ 'kept', 82 ], [ 'notkept', 1 ], [ 'repaired', 3 ] ]; say Dumper $aref; foreach my $i ( @{ $aref } ) { say "label ". $aref->[$i][0]; }

Neil Watson
watson-wilson.ca