3 ms·
>Perl's print (even in very old versions of Perl, dating long before say arrived) also accepts expressions as arguments, so you can write: `print join "\n", @ar
by coldtea 7y ago
>Perl's print (even in very old versions of Perl, dating long before say arrived) also accepts expressions as arguments, so you can write: `print join "\n", @array;`
How's that different from any other language? Isn't the expression argument evaluated before being passed to print, so at that point it's just a string anyway?
>>> print ", ".join(["a","b","c"])
a, b, c
Or, if the point is about omitting the automatic newline, comma in python suppresses it:
>>> print "\n".join(["a","b","c"]),
a
b
c
- SwellJoe 7y agoIt's not (at least most modern languages have it). I was just saying that `say` isn't the interesting thing in the examples given.