Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by Corion (Patriarch)
on Dec 23, 2005 at 00:13 UTC ( [id://518666]=note: print w/replies, xml ) Need Help??


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        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://518666]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found