in reply to use of uninitialized value in array
Tip #2 from the Basic debugging checklist: print. Add more prints inside your for loop. It is likely that $a is beyond the last element of the @matching_values array.
for($a=0;$a<=scalar(@hfr);$a++) { my @matching_indices=indexes {$hfr[$a]}@gl; my @matching_values=@gl[@matching_indices]; print "a=$a\n"; use Data::Dumper; print Dumper(\@matching_indices); print "$matching_indices[$a]"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use of uninitialized value in array
by hippo (Archbishop) on Aug 02, 2013 at 17:19 UTC | |
|
Re^2: use of uninitialized value in array
by rocketperl (Sexton) on Aug 02, 2013 at 16:14 UTC |