File: 02_loop.pl

package info (click to toggle)
plsense 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,012 kB
  • sloc: perl: 9,767; makefile: 2
file content (54 lines) | stat: -rw-r--r-- 835 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/perl

for my $idx ( 0..10 ) {
    # astart for var 1
    #$
    # aend include: idx
}

for ( my $count = 0; $count <= 10; $count++ ) {
    # astart for var 2
    #$
    # aend include: count
}

foreach my $currword ( "hoge", "fuga" ) {
    # astart foreach var
    #$
    # aend include: currword
}

while ( my $line = <> ) {
    # astart while var
    #$
    # aend include: line
}

INDEX:
for my $lidx ( 0..10 ) {
    # astart label for var 1
    #$
    # aend include: lidx
}

ELEMENT:
for ( my $lcount = 0; $lcount <= 10; $lcount++ ) {
    # astart label for var 2
    #$
    # aend include: lcount
}

WORD:
foreach my $lcurrword ( "hoge", "fuga" ) {
    # astart label foreach var
    #$
    # aend include: lcurrword
}

LINE:
while ( my $lline = <> ) {
    # astart label while var
    #$
    # aend include: lline
}