in reply to sprintf and for loop weirds???

Both snippets works well on my box (Windows + ActiveState), but I had to fix a syntax error, adding a ')' at the end of your sprintf instructions. It produced a compile-time error, so I guess this is not your problem.

As a sidenote, I suggest you to write similar loops in a more "perlish" way:

foreach (@a) { push @b, springf("%.2f", $_); }
Update: Ermm... Of course one of the scripts DOES NOT work well. It's better I don't say why I had the impression the first one worked ;)