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

chomp() and $/ = \1024

Thread Next
Jeff Pinyan
March 12, 2001 10:49
chomp() and $/ = \1024
Message ID:
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
Are you a Monk?
Perl Programmer at RiskMetrics Group, Inc.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About