in reply to foreach count variable
The only way to implement such a counter is to loop by index, rather than value - For example:
foreach my $count ($[..$#bar) { print $count, " -> ", $bar[$count], "\n"; }
Not quite as pretty or flexible, but the introduction of implicit loop variables would also mean the introduction of additional construct overhead.
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111100100")),"\n"'
|
|---|