Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: reverse a string in place

by j0se (Pilgrim)
on Mar 24, 2013 at 10:27 UTC ( #1025137=note: print w/ replies, xml ) Need Help??


in reply to Re: reverse a string in place
in thread reverse a string in place

Hello, your Perl solution seems to have problems with strings that have an even number of characters:

Original string: ab Using function: ab Using reverse: ba Original string: abcd Using function: dbca Using reverse: dcba

Excellence is an art won by training and habituation: we do not act rightly because we have virtue or excellence, but we rather have these because we have acted rightly. -- Will Durant


Comment on Re^2: 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://1025137]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2014-12-18 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (51 votes), past polls