The difference is that print imparts a list context, but the dot operator creates a scalar context. Your sqlExecute() ends with "return @result". An array in a scalar context evaluates to the number of items in the array, but in a list context, it's all the elements of the array.
Update: Here are a couple ways to get what you want without three lines:
The first is better for print, but the second can be useful in other places where you want to interpolate a function call.
In reply to Re^5: Quote-like operators in a hash
by kyle
in thread Quote-like operators in a hash
by tux402
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |