Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: reverse a string in place

by tobyink (Abbot)
on Mar 24, 2013 at 09:47 UTC ( #1025136=note: print w/ replies, xml ) Need Help??


in reply to reverse a string in place

my $string = "abcdefghi"; $string =~ s/(.)/substr($string, length($string)-pos($string)-1, 1)/eg +; print $string, "\n";
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re: reverse a string in place
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025136]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-08-01 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (52 votes), past polls