|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Is there a variable in which Perl stores the native file delimiter for the platform on which your script is running?by jmcnamara (Monsignor) |
| on Dec 22, 2005 at 20:34 UTC ( [id://518679]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.I don't think that there is any variable or core module that you can query to get this information. You could check $^O (see perlvar) or Config to get the OS name and work it out from there. However, it might not be easy to produce a foolproof solution with this method. As a workaround I'd suggest writing "\n" to a temp file, binmoding the file and reading back in the character(s) used as line endings.
--
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||