[ create a new paste ] login | about

Link: http://codepad.org/4xBA2ETf    [ raw code | output | fork ]

Perl, pasted on Sep 28:
1
2
3
4
@items = qw(1 2 3 4 5 6 7 8 9);
for ($i = $#items; $i >= 0; $i--) {
    print "$i $items[$i]\n";
}


Output:
1
2
3
4
5
6
7
8
9
8 9
7 8
6 7
5 6
4 5
3 4
2 3
1 2
0 1


Create a new paste based on this one


Comments: