Not that Perl would be lacking string manipulation facilities, but this new feature proposal for (allegedly) perl5.10 simply cries for
use autobox SCALAR => 'rubyisms::String';
print " bla "->strip;
my $foo = "bAR";
Due to different lexer rules in Ruby I had to find a different nomenclature for
string.strip! so I chose
$string->stripI with 'I' being mnemonic for 'in-place' while maintaining some visual similarity to '!'.
So far done are
center. This will take another couple of days since it's being done in XS. After that I can finally run some benchmarks and see whether the XS approach makes up for some of the performance hits introduced by
autobox (which I haven't yet benchmarked, either, so they might not even be severe at all).
For those being adventurous enough (and curious about how it feels like to have everything act like an object), grab perl5.8.1-RC4 and autobox from the CPAN, apply the patch, compile and have FUNNNNNN!