What puts things in list context is print, not the arguments themselves in print reverse $str;. The scalar builtin puts its argument in scalar context. Try print scalar reverse $str;
After Compline,
Zaxo
In reply to Re: How to reverse a string *revisited*
by Zaxo
in thread How to reverse a string *revisited*
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |