On 11-08-30 05:38 AM, Narasimha Madineedi wrote:
Hi all,
I have a string like *"abcd efgh ijkl mnop"* i want to reverse the string
like this "*dcba hgfe lkji ponm*"
can any one tell me how to get the required output?
thanks in advance......
perl -e'@words=split/\s+/,$ARGV[0];$_=reverse$_
for@words;print"@words\n";' 'abcd efgh ijkl mnop'
--
Just my 0.00000002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much about organization and communication
as it is about coding.
The secret to great software: Fail early & often.
Eliminate software piracy: use only FLOSS.
"Make something worthwhile." -- Dear Hunter
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/