From 82d0ecf88ec072403c54716cab62bbccc7c00200 Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Thu, 15 Nov 2012 19:55:04 -0500 Subject: [PATCH] remove `each @` for compatibility with perl v5.10 --- lib/DDG/Goodie/ResistorColors.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/DDG/Goodie/ResistorColors.pm b/lib/DDG/Goodie/ResistorColors.pm index 456c6c6b3..0097c8cc2 100644 --- a/lib/DDG/Goodie/ResistorColors.pm +++ b/lib/DDG/Goodie/ResistorColors.pm @@ -130,7 +130,9 @@ sub render { my $text = "$formatted_value\x{2126} ($ohms) resistor colors:"; my $html = "$formatted_valueΩ ($ohms) resistor colors:"; - while (my ($index, $digit) = each @$digits) { + #while (my ($index, $digit) = each @$digits) { + my $index = 0; + foreach my $digit (@$digits) { if (exists $digits_to_colors{$digit}) { my $name = $digits_to_colors{$digit}{name}; my $hex = $digits_to_colors{$digit}{hex}; @@ -163,6 +165,7 @@ sub render { } else { return; } + $index++; } $html .= "
" . ""