in reply to Why is print output different for function returning an array versus printing an array variable?
Simply, context and interpolation.
print sort(@coins); # List context print "@scoins"; # Scalar context which uses the list separator in +interpolation of the array
See responses in this thread and the section on $LIST_SEPARATOR in perlvar for more info.
|
|---|