[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Read Speed



At 11.23 12/15/97, Mark Manning/Muniz Eng. wrote:
>According to Chris Nandor:
>>
>> Third, chop/chomp returns 1 if successful, 0 if not; it does not return the
>> string.  So if you did C<print OUT chomp($_);>, you would get 1 or 0, not
>> the line.
>
>Ummmmm...... I don't know about CHOMP, but I remember
>reading that CHOP returns the character it chops off.  Not
>1 or 0.  I would believe that CHOMP would return a 0 or 1
>because the chopped off character either is or isn't a
>control character.  :-)

Ah, I was wrong on both (can you tell I never check the return values of
these?).  chop() does return the value chop'ed, and chomp() returns the
number of characters chomp'ed off.

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch