develooper Front page | perl.perl5.porters | Postings from March 2001

chomp() and $/ = \1024

Thread Next
From:
Jeff Pinyan
Date:
March 12, 2001 10:49
Subject:
chomp() and $/ = \1024
Message ID:
Pine.GSO.4.21.0103121338230.24235-100000@crusoe.crusoe.net
What is the behavior of chomp when $/ is a reference to an integer?  The
<> operator acts like read(FH, $$/, $buf), but it appears chomp treats $/
as though it were "" -- that is, it removes any ending newlines.  Granted,
it would be silly for chomp() to remove all $$/ characters from the
string, but should it behave like it does?

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About