[ABE.pm] Re: Per *Unix writing DOS files
faber at linuxnj.com
Mon Oct 4 19:44:40 CDT 2004
On 04/10/04 20:29 -0400, Ricardo SIGNES wrote:
> * Faber Fedor <faber at linuxnj.com> [2004-10-04T19:06:04]
> > If I'm on a Linux box running a Perl script, writing out to a file via
> > print, what is the Proper way of making the output file a "DOS file",
> > e.g. with DOS EOL (\r\n, right? Or do I do ^M?).
> Consult "perldoc perlvar" under $OUTPUT_RECORD_SEPARATOR. The variable
> you want to muck about with is $\ and I suggest you localize it for the
> block in which you write the file.
The way the original programmer wrote it, the "local block" is the
entire file. :-) But this will come in handy nevertheless.
Linux New Jersey: Open Source Solutions for New Jersey
More information about the ABE-pm