in reply to Cutting down a string


This is for boo_radley's golf challenge, although the output differs slightly from his example. 60 chars:
sub squash { ($a,$b)=@_;$b-=3;substr$a,0,-$b/2,substr($a,0,$b/2)."...";$a }
--
John.