You can get the same output with for and while loops:
While:
$i = 0; while ($i <= 10){ print $i.\"\\n\"; $i++; };
They should be equal. The for loop you wrote is doing exactly the same thing that the while loop is doing: setting $i=0, printing $i, and incrementing $i at the end of the loop.
$i=0
$i