[tpm] chomp problem

Uri Guttman uri at StemSystems.com
Fri Feb 4 20:29:27 PST 2011


>>>>> "TL" == Tom Legrady <legrady at gmail.com> writes:

  TL> Perl should know  what platform you are on, and whether \n is carriage
  TL> return, linefeed, or both. Looks to me like something about your
  TL> configuration or locale is confusing Perl.

at the level of perl code \n is always a newline. it is only when
reading/writing to text files on winblows does it matter what the real
line ending is. if the DATA handle is read in text mode, chomp should
work fine. there may be something else going on here. i would check what
the file actually has with od or a similar tool.

uri

-- 
Uri Guttman  ------  uri at stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


More information about the toronto-pm mailing list