Thanks everyone for your answers. I think I'll stick with buf[-10,10] || buf. I was just wondering if I'd missed something obvious like buf.last(10), after staring at 'ri String' too long. Finally I found a usage case where perl has the edge :-) $ perl -e '$a="abc";print substr($a,-10),"\n"' abc $ perl -e '$a="abcdefghijklmnop";print substr($a,-10),"\n"' ghijklmnop Regards, Brian.