in reply to reverse of string

In order to reverse a string, you need to use
print scalar reverse "dog"
because reverse expects an array unless told otherwise. So ... because ucfirst is forcing scalar context onto "reverse"?


($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print

Replies are listed 'Best First'.
Re^2: reverse of string
by msk_0984 (Friar) on May 22, 2006 at 06:05 UTC
    Thanx for your reply, Most of them said it since it by default considers as a list so anyway its good that you have also sent me the code to print it thank you Sushil