reverse by default works on a list
<niggle> Nope. reverse doesn't have a default behaviour. In list context it reverses a list. In scalar context it reverses a string. The print puts the reverse into a list context, hence the behaviour that confused the OP. </niggle>
In reply to Re^2: reverse of string
by adrianh
in thread reverse of string
by msk_0984
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |