in reply to Why the print is not working
print takes a list, and so puts reverse in list context. In list context, reverse returns the list with the items reversed. In the case of a one item list, the result is exactly the same. To reverse the string "dog", you can use:
print scalar reverse "dog";
In Section
Seekers of Perl Wisdom