my $string = "abcdefghi"; $string =~ s/(.)/substr($string, length($string)-pos($string)-1, 1)/eg +; print $string, "\n";
In reply to Re: reverse a string in place
by tobyink
in thread reverse a string in place
by Priti24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |