[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] "," instead of ";" in "for"



The following is correct and print behaves as expected on array @lists.

print 'The names of lists we currently support are:',"\n";
	for ($i = 0; $i < @lists; $i++) {
	print $i;
	print $lists[$i],"\n";
}
OUTPUT:
The names of lists we currently support are:
0jobslist
1arrangements

Change ";" to "," and you get

print 'The names of lists we currently support are:',"\n";
	for ($i = 0, $i < @lists, $i++) {
	print $i;
	print $lists[$i],"\n";
}
OUTPUT:
The names of lists we currently support are:
1arrangements
1arrangements
1arrangements

Any thoughts on the sequence of events that occur to create this output?

Cheers ... John



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org