humaira.nu has asked for the wisdom of the Perl Monks concerning the following question:

What this syntax really is ?
for my $i (0 .. $#array) { for my $j (0 .. $#array) { next if $j == $i; # Compare $i, $j } }
and
for my $i (0 .. $#array - 1) { for my $j ($i + 1 .. $#array) { # Compare $i, $j } }
is it c++ , i mean i can't understand the statements ..

Replies are listed 'Best First'.
Re^3: Big-O Notation - What is it good for?
by LanX (Saint) on Sep 16, 2012 at 10:27 UTC
    $# is the highest index of an array, see "length of an array" in perldata (or perldsc for examples)

    and please use <code>...</code> tags around your snippets when posting.

    Cheers Rolf