in reply to Re: Swap the characters
in thread Swap the characters
$ perl -le ' $str = q{yands}; ( substr( $str, 0, 1 ), substr $str, -1 ) = ( substr( $str, -1 ), subs +tr $str, 0, 1 ); print $str; ' sandy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Swap the characters
by johngg (Canon) on Apr 14, 2009 at 13:54 UTC |