Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
In my Perl script I allow the user to specify which line terminator to use on the command-line [SNIP] Can some one tell me how I can find out dynamically at run time what the native line terminator is for the platform on which my script is running? Others told you how to retrieve it from layers info, by means of PerlIO. Now, the next logical step which happens to be even simpler is that you can also use layers to set the output mode once you know what you want:
Incidentally, you're not referring to the "file delimiter", which rather suggests the idea of EOF marker (^D under *NIX and ^Z under DOS/Win* AFAIK), but to the "end-of-line" marker. In reply to Re: Is there a variable in which Perl stores the native file delimiter for the platform on which your script is running?
by blazar
|
|