Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: reverse a string in place

by davido (Archbishop)
on Mar 24, 2013 at 21:32 UTC ( #1025187=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub rec_reverse {
      return $_[0] if $_[0] eq '';
    ...
    }
    
    print rec_reverse( "Hello\nworld." ), "\n";
    
  2. or download this
    sub rec_reverse {
      my $problem = shift;
    ...
        return rec_reverse( $smaller_problem ) . $char;
      }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025187]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2018-07-17 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (374 votes). Check out past polls.

    Notices?