http://qs321.pair.com?node_id=132681


in reply to strlen like function in perl

You're looking for length.

update: Though, if golf is what you want, I've heard y///c be used to get the length of $_. (It's one character shorter. And, IIRC, that trick is credited to Abigail.) (y///c or any of its equivilents is not reccommended for code you plan on actually using, of course.)