in reply to Re: How do I reverse the order of the first and last word of a string?
in thread How do I reverse the order of the first and last word of a string?
and doing without the join:
my $string = 'This is my program'; my @arr = split ' ', $string; print "@arr[-1, 1..$#arr-1, 0]";
After all, we don't want to introduce too much on the first lesson.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do I reverse the order of the first and last word of a string?
by Zaxo (Archbishop) on Mar 11, 2007 at 06:50 UTC | |
by GrandFather (Saint) on Mar 11, 2007 at 06:57 UTC |