ashokpj has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am trying to reverse the string. So I tried the following
perl -e "print reverse ("Monks");"But, It doesn't reverse print.
OUTPUT:
MonksBut, When I use scalar It print reverse
perl -e "print scalar reverse ("Monks");"OUTPUT:
sknoMI need to know, why its not printing when i use reverse without scalar.
Thanks in Advance Ashok
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reverse the String
by Fletch (Bishop) on Nov 06, 2006 at 14:43 UTC | |
|
Re: Reverse the String
by jbert (Priest) on Nov 06, 2006 at 15:03 UTC | |
|
Re: Reverse the String
by swampyankee (Parson) on Nov 06, 2006 at 18:12 UTC | |
|
Re: Reverse the String
by jort (Initiate) on Nov 06, 2006 at 22:23 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |