perl -e 'print((sort(<*>))[1]);'
Once the expression is fully inside parentheses, there is no syntax error. With the square brackets outside the parens, it must be trying to get the first element of the array returned by print(), which doesn't return an array.
In reply to Re^3: What's the difference between stat and sort?
by beable
in thread What's the difference between stat and sort?
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |