File: Each.run

package info (click to toggle)
libperl-critic-freenode-perl 0.033-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 400 kB
  • sloc: perl: 1,038; makefile: 5
file content (13 lines) | stat: -rw-r--r-- 234 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
## name UseEach
## failures 2
## cut

while (($key, $value) = each %hash) { ... }
while (($i, $elem) = each @array) { ... }

## name NoEach
## failures 0
## cut

foreach my $key (keys %hash) { ... }
foreach my $i (0..$#array) { ... }