in reply to Is there a variable in which Perl stores the native file delimiter for the platform on which your script is running?

perldoc perlvar tells us that $/ contains whatever is used to mark the end of line. And chomp removes it from the end of a string.

  • Comment on Re: Is there a variable in which Perl stores the native file delimiter for the platform on which your script is running?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Is there a variable in which Perl stores the native file delimiter for the platform on which your script is running? ($/)
by tye (Sage) on Dec 23, 2005 at 01:14 UTC

    And $/ is (defaults to) "\n" on every platform. And "\n" is "\cJ" aka "\x0a" on every ASCII platform (it is "\cM"/"\x0d" on the near-ASCII platform of old Macs). So $/ doesn't have much to do with the original question.

    - tye