Newsgroup: comp.lang.perl


Path: doc.ic.ac.uk!dds
From: dds@doc.ic.ac.uk (Diomidis Spinellis)
Newsgroups: comp.lang.perl
Subject: Re: New Perl structure plea
Date: 24 Nov 1993 12:28:38 GMT
Organization: Dept of Computing, Imperial College, England
Lines: 32
Message-ID: <2cvk1m$b84@frigate.doc.ic.ac.uk>
References: <2csvsm$2ka@frigate.doc.ic.ac.uk> <1993Nov23.194330.21332@convex.com>
NNTP-Posting-Host: scorch.doc.ic.ac.uk
Content-Length: 1235
In article <1993Nov23.194330.21332@convex.com> tchrist@cs.Colorado.EDU (Tom Christiansen) writes:
>:-> In comp.lang.perl, dds@doc.ic.ac.uk (Diomidis Spinellis) writes:
>:thing forking Perl, but I think this would be inefficient.  The ideal
>:solution would be to allow a pipe construct between Perl statements
>:as in:
[...]
>:# Preliminary processing; remove comments and merge continuation lines
>:while (<>) {
[...]
>:} | # <-- Notice pipe symbol
>:# Main program processing
>:while (<>) {
>:	# More processing
>:}

>Are you aware of what happens when you open on a pipe symbol??
>It has the nice semantics of giving you the pid, which your approach 
>would not.  Plus it already is in there. :-)

Yes, BUT

1. The syntax is a lot less clearer, especialy when a multiple stage
pipeline is constructed.  At the very least I am asking for syntactic 
sugar; I think this is the perlish thing to do.

2. A new process is created for each pipeline stage which makes it
inefficient and difficult to implement on non-multitasking systems.

Diomidis
-- 
Diomidis Spinellis    Internet: <dds@doc.ic.ac.uk>  UUCP: ...!uknet!icdoc!dds
Department of Computing, Imperial College, London SW7     #include "/dev/tty"



Newsgroup comp.lang.perl contents
Newsgroup list
Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.