Thus it was written in the epistle of Uri Guttman,
> 
> if a ref to a scalar, it chomps in place. return the ref? the chomped
> char count?

. . . the point of the RFC was to propose making chomp()'s behaviour change
depending on context.

Here's the summary so far as I can tell:

One-argument chomp():
  void context:
    no argument: 
      chomp()s $_ using one of (global $/, $/ of current filehandle, depending
                                upon other implementation choices 
                                (called $/? below))
    scalar: 
      chomp()s value in scalar using $/?
    array:
      chomp()s each element of array using $/?
    hash:
      chomp()s each value (not key) of hash using $/?
    reference to one of the above:
      does the appropriate thing to the referenced variable (I believe that's
        what was suggested)
    otherwise does nothing except perhaps producing a warning
  while(chomp(<>)) and friends:
    does the appropriate sort of while(<>) { chomp; } thing
  scalar or list context:
    returns the chomp()ed value of the argument (see above).
  As an OO filehandle method:
    does as above, but using the $/ associated with the filehandle.
two-argument chomp(): 
    does as above, but using the second argument (which is a scalar, not a
       regex)

Ted
-- 
Ted Ashton ([EMAIL PROTECTED]), Info Sys, Southern Adventist University
          ==========================================================           
An expert problem solver must be endowed with two incompatible qualities, a
restless imagination and a patient pertinacity.
                                        -- Eves, Howard W.
          ==========================================================           
         Deep thoughts to be found at http://www.southern.edu/~ashted

Reply via email to