in reply to
reverse of string
print reverse 'dog';
reverse
is in list context and reverts a list of someting. your list has only one entry 'dog'.
for
print ucfirst reverse "dog";
reverse
is in scalar context and reverts a string instead of a list.
Boris
Comment on
Re: reverse of string
In Section
Seekers of Perl Wisdom