Date: Tue, 12 Nov 2002 08:14:08 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: deckerben cc: djgpp AT delorie DOT com Subject: Re: djgpp or perl? In-Reply-To: <3dd01e72$0$3212$9b622d9e@news.freenet.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 11 Nov 2002, deckerben wrote: > > The representation of EOF is system dependent. On DOS systems, it is CTRL-Z > > as opposed to the Unix convention of CTRL-D. > > Hmmmm... is it necessary to stick to that convention? We cannot change DOS system calls, can we? The possibility of an interactive program to interpret Ctrl-D as EOF depends on how it reads its input. If it does so with standard DOS calls (via `read', `getc' or other library functions which call DOS I/O), this isn't possible without some very painful tweaking of the program's original code (this is a port, remember?). In contrast, if input is read via termios or other console-specific interface, the task is much easier, since those I/O methods bypass normal DOS calls. So what Python does is not necessarily applicable to Perl.