>>I'll second that motion.  We already have lots of ways of removing the
>>last character of a string if that's what we really need.

>But they're slow and hard to read.

I would actualy like to see chop expanded to allow a variable number of
characters to be removed and a sister function to cut the head off. Yes I
know you can do this with substr but sometimes when you want the performance
and need to cut up a string into fields. Lets say the new function is called
'take'.
  while($str =<F>)
     {
     $head = take($str,40);
     $tail = chop($str,40);
     $middle = $str;
     #assuming $str had 120 characters in it
     }


Just a thought....

Reply via email to