in reply to Re^4: Quote-like operators in a hash
in thread Quote-like operators in a hash
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Quote-like operators in a hash
by tux402 (Acolyte) on Jan 05, 2009 at 19:15 UTC | |
|
Re^6: Quote-like operators in a hash
by wol (Hermit) on Jan 06, 2009 at 11:10 UTC |