This is the mail archive of the
cygwin-talk
mailing list for the cygwin project.
RE: Wish Setup would accept my Perl
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'how come everyone on facebook keeps writing messages on my larry wall?'" <cygwin-talk at cygwin dot com>
- Date: Wed, 7 Nov 2007 20:34:31 -0000
- Subject: RE: Wish Setup would accept my Perl
- References: <loom.20071105T183528-568@post.gmane.org> <fgq3au$q89$1@ger.gmane.org> <183c528b0711060821u278c0775of56ba7e004aaf180@mail.gmail.com> <fgslos$i0i$1@ger.gmane.org> <002101c82155$c8227fa0$2e08a8c0@CAM.ARTIMI.COM> <47321860.2000902@veritech.com>
- Reply-to: The Vulgar and Unprofessional Cygwin-Talk List <cygwin-talk at cygwin dot com>
On 07 November 2007 19:56, LDR wrote:
> The advantages of using AS Perl, as I see it:
>
> * It's easier to package an app for use by others who may or may not
> be using Cygwin, or even Windows. (In fact, that's the major
> reason that I would do any app in Perl-only, anyways. AS perl
> just makes the app span Windows w/o Cygwin.)
Mingw perl?
;-)
> * Better debugger.
>
> In fact, I'm in the process of rewriting an app that I had previously
> written (evolved!) in Bash, awk, sed ... with some Perl routines.
Heh, how can you tell the difference? Perl basically IS the shell, plus awk
and sed, all wrapped up into a kind-of-a-language lucky dip/grabbag/jumble
sale.
I'm fairly sure the first version of perl looked something like ...
$ cat perl.sh
#!/bin/bash
# Perl v0.0.1
# (c) Larry Wall aged 17+3/4
TMPFILE=`mktemp`
CC=`which gcc`
cat >${TMPFILE} <<EOT
/* Compiled by perl-0.0.1 */
#include <stdlib.h>
#include <stdio.h>
int main () {
EOT
while read x ;
do
echo >> ${TMPFILE} " system (\"sh -c \'${x:-:}\'\"); " ;
done
cat >>${TMPFILE} <<EOT
return 0;
}
EOT
${CC} -x c ${TMPFILE} -o ${TMPFILE}.pm
chmod a+x ${TMPFILE}.pm
exec ${TMPFILE}.pm
rm ${TMPFILE} ${TMPFILE}.pm
In version 0.0.2, he added '-g' to the $(CC) line. For better debugging.
cheers,
DaveK
--
Can't think of a witty .sigline today....