Most assuredly, your code does not implement bubble sort.
And if we are going to golf it, how about this:
perl -E 'say"2 6 9 12 15"'
In reply to Re^3: Sort routine runs into infinite loop
by oiskuu
in thread Sort routine runs into infinite loop
by punitpawar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |