[17820] in Perl-Users-Digest
Perl-Users Digest, Issue: 5240 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 4 19:56:46 2001
Date: Thu, 4 Jan 2001 16:56:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <978656179-v9-i5240@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 4 Jan 2001 Volume: 9 Number: 5240
Today's topics:
Perl for Palm <tzadikv@my-deja.com>
Re: Perl for Palm (Steve)
Re: Perl for Palm <tzadikv@my-deja.com>
Re: Perl for Palm (Alan Barclay)
Re: Perl for Palm <tzadikv@my-deja.com>
Re: Perl for Palm <ter@my-deja.com>
Re: Perl for Palm <nospam.newton@gmx.li>
Re: Perl for Palm <dan@tuatha.sidhe.org>
Re: Perl for Palm <tzadikv@my-deja.com>
Re: Perl for Palm <mischief@velma.motion.net>
Re: Perl for Palm <dan@tuatha.sidhe.org>
Re: Perl for Palm <uri@sysarch.com>
Re: Perl for Palm <nospam.newton@gmx.li>
Perl libraries for grammars? <vezerid@ac.anatolia.edu.gr>
Re: Perl libraries for grammars? (Martien Verbruggen)
Perl module equal to EJBs <kbass1@nc-rr.com>
Re: Perl module equal to EJBs (Martien Verbruggen)
Perl Module for HTML variable substitution and looping <derek@realware.com.au>
Re: Perl Module for HTML variable substitution and loop (Chris Fedde)
Re: Perl Module for HTML variable substitution and loop <Peter.Dintelmann@dresdner-bank.com>
Re: Perl Module for HTML variable substitution and loop <ducateg@info.bt.co.uk>
Perl or SSI or WebSTAR setting problem ? <claudej@videotron.ca>
Re: Perl or SSI or WebSTAR setting problem ? <sunymoon@geocities.com>
Re: Perl or SSI or WebSTAR setting problem ? (Abigail)
Perl problem resolution checklist (was Re: General Pers (Tad McClellan)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 29 Dec 2000 19:00:28 GMT
From: Tzadik Vanderhoof <tzadikv@my-deja.com>
Subject: Perl for Palm
Message-Id: <92in09$pf1$1@nnrp1.deja.com>
I don't know why it would be out of the question to port Perl to
PalmOS, since Palm apps are written in C, and so is Perl. Isn't there
already something called "microperl", which is totally system-
independent, that is part of Perl's bootstrap procedure? It seems like
at least that part should work and give some minimal functionality.
Memory would be an important issue... the thing only has 8MB total,
including both working and permanent storage!
--
Tzadik
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 29 Dec 2000 20:30:03 GMT
From: steve@zeropps.uklinux.net (Steve)
Subject: Re: Perl for Palm
Message-Id: <slrn94pqs6.1eb.steve@zero-pps.localdomain>
On Fri, 29 Dec 2000 19:00:28 GMT, Tzadik Vanderhoof wrote:
>I don't know why it would be out of the question to port Perl to
>PalmOS, since Palm apps are written in C, and so is Perl. Isn't there
>already something called "microperl", which is totally system-
>independent, that is part of Perl's bootstrap procedure? It seems like
>at least that part should work and give some minimal functionality.
>Memory would be an important issue... the thing only has 8MB total,
>including both working and permanent storage!
I think there is, as there's a perl quick reference for it here:
http://www.memoware.com/b/perl-jv.pdb
Have a look around on http://www.perl.com/ you may find a pointer
there somewhere.
--
Cheers
Steve email mailto:steve@zeropps.uklinux.net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
7:41pm up 11 days, 7:02, 3 users, load average: 1.04, 1.06, 1.02
------------------------------
Date: Sun, 31 Dec 2000 15:47:34 GMT
From: Tzadik Vanderhoof <tzadikv@my-deja.com>
Subject: Re: Perl for Palm
Message-Id: <92nkel$9er$1@nnrp1.deja.com>
No, the memoware link you gave me is just a Quick Reference to Perl in
Palm Doc format. It's useful, but what I was refering to is a Perl
that actually *runs* on the Palm.
In article <slrn94pqs6.1eb.steve@zero-pps.localdomain>,
steve@zeropps.uklinux.net wrote:
> On Fri, 29 Dec 2000 19:00:28 GMT, Tzadik Vanderhoof wrote:
> >I don't know why it would be out of the question to port Perl to
> >PalmOS, since Palm apps are written in C, and so is Perl. Isn't
there
> >already something called "microperl", which is totally system-
> >independent, that is part of Perl's bootstrap procedure? It seems
like
> >at least that part should work and give some minimal functionality.
> >Memory would be an important issue... the thing only has 8MB total,
> >including both working and permanent storage!
>
> I think there is, as there's a perl quick reference for it here:
>
> http://www.memoware.com/b/perl-jv.pdb
>
> Have a look around on http://www.perl.com/ you may find a pointer
> there somewhere.
>
> --
> Cheers
> Steve email mailto:steve@zeropps.uklinux.net
>
> %HAV-A-NICEDAY Error not enough coffee 0 pps.
>
> web http://www.zeropps.uklinux.net/
>
> or http://start.at/zero-pps
>
> 7:41pm up 11 days, 7:02, 3 users, load average: 1.04, 1.06, 1.02
>
--
Tzadik
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 31 Dec 2000 19:11:22 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: Perl for Palm
Message-Id: <978289872.376353@elaine.furryape.com>
In article <92nkel$9er$1@nnrp1.deja.com>,
Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
>No, the memoware link you gave me is just a Quick Reference to Perl in
>Palm Doc format. It's useful, but what I was refering to is a Perl
>that actually *runs* on the Palm.
>
The Palm is a 16 bit platform, and as such is limited to 64k of memory,
for any one running instance of a program. This is far too small to run
perl.
------------------------------
Date: Tue, 02 Jan 2001 21:00:58 GMT
From: Tzadik Vanderhoof <tzadikv@my-deja.com>
Subject: Re: Perl for Palm
Message-Id: <92tfi5$i40$1@nnrp1.deja.com>
In article <978289872.376353@elaine.furryape.com>,
gorilla@elaine.furryape.com (Alan Barclay) wrote:
> In article <92nkel$9er$1@nnrp1.deja.com>,
> Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
> >No, the memoware link you gave me is just a Quick Reference to Perl
in
> >Palm Doc format. It's useful, but what I was refering to is a Perl
> >that actually *runs* on the Palm.
> >
>
> The Palm is a 16 bit platform, and as such is limited to 64k of
memory,
> for any one running instance of a program. This is far too small to
run
> perl.
>
That does not seem right... doesn't Perl run on any 16-bit platforms?
--
Tzadik
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Wed, 03 Jan 2001 03:50:27 GMT
From: Tim Richardson <ter@my-deja.com>
Subject: Re: Perl for Palm
Message-Id: <92u7i1$6pt$1@nnrp1.deja.com>
Can I have Perl on my mobile phone? I want to sort my address book in
weird ways.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Wed, 03 Jan 2001 18:25:49 +0100
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
Subject: Re: Perl for Palm
Message-Id: <9em65t42ae2vfe2oaqhtbkjobles7ecsrf@4ax.com>
On Tue, 02 Jan 2001 21:00:58 GMT, Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
> In article <978289872.376353@elaine.furryape.com>,
> gorilla@elaine.furryape.com (Alan Barclay) wrote:
> >
> > The Palm is a 16 bit platform, and as such is limited to 64k of
> > memory, for any one running instance of a program. This is far
> > too small to run perl.
>
> That does not seem right... doesn't Perl run on any 16-bit platforms?
Well, there's DOS, but I only know of the version compiled with DJGPP there,
which uses a DOS extender, so it's not really a 16-bit platform any more.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 03 Jan 2001 18:26:37 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl for Palm
Message-Id: <x9K46.121567$P82.13986093@news1.rdc1.ct.home.com>
Philip 'Yes, that's my address' Newton <nospam.newton@gmx.li> wrote:
> On Tue, 02 Jan 2001 21:00:58 GMT, Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
>> In article <978289872.376353@elaine.furryape.com>,
>> gorilla@elaine.furryape.com (Alan Barclay) wrote:
>> >
>> > The Palm is a 16 bit platform, and as such is limited to 64k of
>> > memory, for any one running instance of a program. This is far
>> > too small to run perl.
>>
>> That does not seem right... doesn't Perl run on any 16-bit platforms?
> Well, there's DOS, but I only know of the version compiled with DJGPP there,
> which uses a DOS extender, so it's not really a 16-bit platform any more.
DOS never really was a 16-bit platform, at least not in the way meant here.
Pointers have always been larger than 16 bits. (Granted, with odd segment
register nonsense)
Perl 5 could work on the palm, though it'd take a lot of shoehorning and
a bunch of platform-specific custom code. Dunno whether anyone'll take this
on, or just wait for perl 6.
Dan
------------------------------
Date: Wed, 03 Jan 2001 19:14:25 GMT
From: Tzadik Vanderhoof <tzadikv@my-deja.com>
Subject: Re: Perl for Palm
Message-Id: <92vtm8$ie8$1@nnrp1.deja.com>
In article <x9K46.121567$P82.13986093@news1.rdc1.ct.home.com>,
Dan Sugalski <dan@tuatha.sidhe.org> wrote:
> Philip 'Yes, that's my address' Newton <nospam.newton@gmx.li> wrote:
> > On Tue, 02 Jan 2001 21:00:58 GMT, Tzadik Vanderhoof <tzadikv@my-
deja.com> wrote:
>
> >> In article <978289872.376353@elaine.furryape.com>,
> >> gorilla@elaine.furryape.com (Alan Barclay) wrote:
> >> >
> >> > The Palm is a 16 bit platform, and as such is limited to 64k of
> >> > memory, for any one running instance of a program. This is far
> >> > too small to run perl.
> >>
> >> That does not seem right... doesn't Perl run on any 16-bit
platforms?
>
> > Well, there's DOS, but I only know of the version compiled with
DJGPP there,
> > which uses a DOS extender, so it's not really a 16-bit platform any
more.
>
> DOS never really was a 16-bit platform, at least not in the way meant
here.
> Pointers have always been larger than 16 bits. (Granted, with odd
segment
> register nonsense)
>
> Perl 5 could work on the palm, though it'd take a lot of shoehorning
and
> a bunch of platform-specific custom code. Dunno whether anyone'll
take this
> on, or just wait for perl 6.
>
> Dan
>
How will Perl 6 help?
--
Tzadik
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Wed, 03 Jan 2001 20:13:01 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Perl for Palm
Message-Id: <t571udijbsot9d@corp.supernews.com>
Philip 'Yes, that's my address' Newton <nospam.newton@gmx.li> wrote:
> On Tue, 02 Jan 2001 21:00:58 GMT, Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
>> In article <978289872.376353@elaine.furryape.com>,
>> gorilla@elaine.furryape.com (Alan Barclay) wrote:
>> >
>> > The Palm is a 16 bit platform, and as such is limited to 64k of
>> > memory, for any one running instance of a program. This is far
>> > too small to run perl.
>>
>> That does not seem right... doesn't Perl run on any 16-bit platforms?
> Well, there's DOS, but I only know of the version compiled with DJGPP there,
> which uses a DOS extender, so it's not really a 16-bit platform any more.
I don't see a DOS extender included in this DOS version of Perl but it's
only Perl 4. The URL is
http://www.simtel.net/pub/simtelnet/msdos/perl/perl4019.zip
but you can find lots of Perl stuff for DOS on SimTel. Look at
http://www.simtel.net/simcgi-bin/dosfind.cgi?queryinput=Perl
or go to http://www.simtel.net and search for Perl.
The version above is clearly a port, and it's an older version. It's
not quite the standard distribution, but I've used it before. There's
also another version (also a port of Perl 4) that uses a file called
Perl286.exe which I would guess might be a DOS protected mode driver
but at least it's still 16-bit protected mode if it's on a 286.
There surely are some limitations to running anything in a 16-bit
environment, but if QuickBasic could tokenize and byte-code
interpret on 16 bits, I bet Perl can too. How well is another story.
Chris
--
Christopher E. Stith
For the pleasure of others, please adhere to the following rules when visiting your park:
No swimming. No fishing. No flying kites. No frisbees.
No audio equipment. Stay off grass. No pets. No running.
------------------------------
Date: Wed, 03 Jan 2001 20:45:26 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl for Palm
Message-Id: <GbM46.121716$P82.14001438@news1.rdc1.ct.home.com>
Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
> In article <x9K46.121567$P82.13986093@news1.rdc1.ct.home.com>,
> Dan Sugalski <dan@tuatha.sidhe.org> wrote:
>> Perl 5 could work on the palm, though it'd take a lot of shoehorning
>> and
>> a bunch of platform-specific custom code. Dunno whether anyone'll
>> take this
>> on, or just wait for perl 6.
> How will Perl 6 help?
Getting perl running on the palm, at least in a runtime version (you may
need to bytecode compile on another system, and the parser will probably
not be available) is a goal of perl 6.
Dan
------------------------------
Date: Wed, 03 Jan 2001 20:49:53 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Perl for Palm
Message-Id: <x7n1d88ioe.fsf@home.sysarch.com>
>>>>> "TV" == Tzadik Vanderhoof <tzadikv@my-deja.com> writes:
TV> Dan Sugalski <dan@tuatha.sidhe.org> wrote:
>> Perl 5 could work on the palm, though it'd take a lot of shoehorning
TV> and
>> a bunch of platform-specific custom code. Dunno whether anyone'll
TV> take this
>> on, or just wait for perl 6.
TV> How will Perl 6 help?
because it is being designed from scratch and it will be more modular as
one of the goasl is to be more easily ported to more platforms such as
the palm. so it could have string eval ripped out and some palm memory
management hacks put in at config time.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Thu, 04 Jan 2001 14:52:01 +0100
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
Subject: Re: Perl for Palm
Message-Id: <bnt85tkjkbrq91ocq290ieqri7n4f0ee8j@4ax.com>
On Wed, 03 Jan 2001 18:26:37 GMT, Dan Sugalski <dan@tuatha.sidhe.org> wrote:
> DOS never really was a 16-bit platform, at least not in the way meant here.
> Pointers have always been larger than 16 bits. (Granted, with odd segment
> register nonsense)
OK, 20 bit memory access but 16 bit arithmetic then. And no single data item
could be larger than 64K without going through contortions (aka "huge" model).
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Tue, 02 Jan 2001 12:01:07 GMT
From: Costis Vezeridis <vezerid@ac.anatolia.edu.gr>
Subject: Perl libraries for grammars?
Message-Id: <92sfu2$n1c$1@nnrp1.deja.com>
I am working on a lexicographic project. My task is to take a large
formatted file and break it into a database. I can describe the lemma
structure with a grammar. My question: are there perl libraries that
allow me to specify a grammar and then parsing will (relatively easily)
follow?
TIA
--
Costis Vezeridis
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Tue, 2 Jan 2001 23:35:44 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Perl libraries for grammars?
Message-Id: <slrn953ip0.edk.mgjv@martien.heliotrope.home>
On Tue, 02 Jan 2001 12:01:07 GMT,
Costis Vezeridis <vezerid@ac.anatolia.edu.gr> wrote:
> I am working on a lexicographic project. My task is to take a large
> formatted file and break it into a database. I can describe the lemma
> structure with a grammar. My question: are there perl libraries that
> allow me to specify a grammar and then parsing will (relatively easily)
> follow?
Parse::RecDescent
Get it from CPAN: www.cpan.org, search.cpan.org
Martien
--
Martien Verbruggen |
Interactive Media Division | I took an IQ test and the results
Commercial Dynamics Pty. Ltd. | were negative.
NSW, Australia |
------------------------------
Date: Fri, 29 Dec 2000 15:04:30 GMT
From: "Kevin B" <kbass1@nc-rr.com>
Subject: Perl module equal to EJBs
Message-Id: <2K136.144320$4K4.24395976@typhoon.southeast.rr.com>
Is there a Perl module or group of Perl modules that are equal to Java's
EJBs? If so, where can I find documentation.
Kevin
------------------------------
Date: Sat, 30 Dec 2000 10:20:32 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Perl module equal to EJBs
Message-Id: <slrn94q720.6lr.mgjv@martien.heliotrope.home>
On Fri, 29 Dec 2000 15:04:30 GMT,
Kevin B <kbass1@nc-rr.com> wrote:
> Is there a Perl module or group of Perl modules that are equal to Java's
> EJBs? If so, where can I find documentation.
If you are asking whether there is a subset of modules that all have an
agreed interface so that some other application can interrogate and use
them: no, there isn't. There are groups of modules that have set
interfaces, but nothing like the JavaBeans or EJB stuff.
(Almost) all available Perl modules can be found at CPAN
(http://www.cpan.org and http://search.cpan.org).
Martien
--
Martien Verbruggen |
Interactive Media Division | Unix is user friendly. It's just
Commercial Dynamics Pty. Ltd. | selective about its friends.
NSW, Australia |
------------------------------
Date: Thu, 4 Jan 2001 16:41:57 +1000
From: Derek Lavine <derek@realware.com.au>
Subject: Perl Module for HTML variable substitution and looping etc.
Message-Id: <MPG.14beb83337cff908989688@news.hutch.com.au>
Hi,
I have to start by admitting that I have been using ColdFusion for a
while and am looking to start using Perl again on specific projects. One
of the things that makes CF so easy is the fact that I can embed, in the
HTML page, code for doing things like constructing tables based on result
sets. And displaying certain elements on a page depending on the result
of an expression etc. etc.
e.g.
in CF a html file (well .cfm file) can contain things like
<cfif myVar is "1">
<table><tr><td>This is my test line
</td></tr>
</table>
<cfelse>
<table><tr><td>This is NOT test line
</td></tr>
</table>
</cfif>
<cfquery name="myResult" ...>
select col1, col2 from myTable
</cfquery>
<table>
<cfoutput query=myTable>
<tr>
<td>#col1#</td><td>#col2#</td>
</tr>
</cfoutput>
</table>
Is there a perl module that will handle some form of embedded perl script
in a HTML page to accomplish a similar effect
Thank you for your time
Derek
------------------------------
Date: Thu, 04 Jan 2001 06:03:55 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Perl Module for HTML variable substitution and looping etc.
Message-Id: <fnU46.644$B9.190374912@news.frii.net>
In article <MPG.14beb83337cff908989688@news.hutch.com.au>,
Derek Lavine <derek@realware.com.au> wrote:
>Hi,
>
>I have to start by admitting that I have been using ColdFusion for a
>while and am looking to start using Perl again on specific projects. One
>of the things that makes CF so easy is the fact that I can embed, in the
>HTML page, code for doing things like constructing tables based on result
>sets. And displaying certain elements on a page depending on the result
>of an expression etc. etc.
>
There are many template modules in perl. With two main flavors. One is the
text inside perl form and the other is the perl inside text form.
The two that spring to mind for me are Text::Template of the first flavor
and eperl of the second.
YMMV
chris
--
This space intentionally left blank
------------------------------
Date: Thu, 4 Jan 2001 09:36:38 +0100
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Perl Module for HTML variable substitution and looping etc.
Message-Id: <931cnm$9dk1@intranews.bank.dresdner.net>
Hi Derek,
"Derek Lavine" <derek@realware.com.au> wrote in message
news:MPG.14beb83337cff908989688@news.hutch.com.au...
[snip]
> Is there a perl module that will handle some form of embedded perl script
> in a HTML page to accomplish a similar effect
Mason http://www.masonhq.com is a very powerful tool
to do this.
Regards,
Peter Dintelmann
------------------------------
Date: Thu, 4 Jan 2001 09:02:57 -0000
From: "Géry" <ducateg@info.bt.co.uk>
Subject: Re: Perl Module for HTML variable substitution and looping etc.
Message-Id: <931ed6$eg1$1@pheidippides.axion.bt.co.uk>
Hi,
I have been using HTML::Template.
Regards
--
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Géry Ducatel
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
"Derek Lavine" <derek@realware.com.au> wrote in message
news:MPG.14beb83337cff908989688@news.hutch.com.au...
> Hi,
>
> I have to start by admitting that I have been using ColdFusion for a
> while and am looking to start using Perl again on specific projects. One
> of the things that makes CF so easy is the fact that I can embed, in the
> HTML page, code for doing things like constructing tables based on result
> sets. And displaying certain elements on a page depending on the result
> of an expression etc. etc.
>
> e.g.
>
> in CF a html file (well .cfm file) can contain things like
>
> <cfif myVar is "1">
> <table><tr><td>This is my test line
> </td></tr>
> </table>
> <cfelse>
> <table><tr><td>This is NOT test line
> </td></tr>
> </table>
> </cfif>
>
> <cfquery name="myResult" ...>
> select col1, col2 from myTable
> </cfquery>
>
> <table>
> <cfoutput query=myTable>
> <tr>
> <td>#col1#</td><td>#col2#</td>
> </tr>
> </cfoutput>
> </table>
>
> Is there a perl module that will handle some form of embedded perl script
> in a HTML page to accomplish a similar effect
>
> Thank you for your time
> Derek
>
------------------------------
Date: Sun, 31 Dec 2000 16:00:16 -0500
From: claudej <claudej@videotron.ca>
Subject: Perl or SSI or WebSTAR setting problem ?
Message-Id: <B6750890.1CE4F%claudej@videotron.ca>
If I use a CGI <!--#include virtual="/cgi-bin/aa.cgi"-->
nothing is passed to MacPerl, not even an error message.
If instead I use a text file, the content is included.
<!--#include virtual="/cgi-bin/aa.txt"-->
So , #include,virtual, and the path are OK. The #echo works fine as well.
In SSI setting (WebSTAR Admin) I have "Allow unrestricted use of commands
for #EXEC and #INCLUDE "
And if I click on "click me" the cgi works fine. (But it's not an include,
it makes an open() and print "Hello"). So I need the include. The real cgi
will be a lot more complex.
_______________________________________________
<HTML><HEAD><TITLE>My title</TITLE></HEAD><BODY>
<A HREF="/cgi-bin/aa.cgi">click me</A><BR>
<!--#include virtual="/cgi-bin/aa.cgi"-->
<!--#echo var="DATE_LOCAL"-->
</BODY></HTML>
____________________ The aa.cgi ______________________
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "Hello";
What can be the problem ?
Thanks in advance,
Claude Johnson
http://pages.infinit.net/kurodo/
------------------------------
Date: Mon, 01 Jan 2001 19:38:35 GMT
From: "Sean" <sunymoon@geocities.com>
Subject: Re: Perl or SSI or WebSTAR setting problem ?
Message-Id: <%0546.113783$7I.11521732@typhoon.nyroc.rr.com>
See if <!--#exec cgi="/cgi-bin/aa.cgi"--> is supported by your HTTPd.
--
Sean S. -:- ICQ: 1826323
(Email: sunymoon <AT> GeoCities >DOT< com )
claudej wrote in message ...
>If I use a CGI <!--#include virtual="/cgi-bin/aa.cgi"-->
>nothing is passed to MacPerl, not even an error message.
>
>If instead I use a text file, the content is included.
>
><!--#include virtual="/cgi-bin/aa.txt"-->
>
>So , #include,virtual, and the path are OK. The #echo works fine as well.
>
>In SSI setting (WebSTAR Admin) I have "Allow unrestricted use of commands
>for #EXEC and #INCLUDE "
>
>And if I click on "click me" the cgi works fine. (But it's not an include,
>it makes an open() and print "Hello"). So I need the include. The real cgi
>will be a lot more complex.
>_______________________________________________
><HTML><HEAD><TITLE>My title</TITLE></HEAD><BODY>
><A HREF="/cgi-bin/aa.cgi">click me</A><BR>
>
><!--#include virtual="/cgi-bin/aa.cgi"-->
><!--#echo var="DATE_LOCAL"-->
>
></BODY></HTML>
>____________________ The aa.cgi ______________________
>
>#!/usr/local/bin/perl
>
>print "Content-type: text/html\n\n";
>print "Hello";
>
>
>What can be the problem ?
>
>Thanks in advance,
>
>Claude Johnson
>http://pages.infinit.net/kurodo/
>
------------------------------
Date: 3 Jan 2001 15:14:14 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Perl or SSI or WebSTAR setting problem ?
Message-Id: <slrn956ge6.f94.abigail@tsathoggua.rlyeh.net>
claudej (claudej@videotron.ca) wrote on MMDCLXXIX September MCMXCIII in
<URL:news:B6750890.1CE4F%claudej@videotron.ca>:
}} If I use a CGI <!--#include virtual="/cgi-bin/aa.cgi"-->
}} nothing is passed to MacPerl, not even an error message.
}}
}} If instead I use a text file, the content is included.
}}
}} <!--#include virtual="/cgi-bin/aa.txt"-->
That's an webserver configuration problem, not a Perl problem.
Go ask elsewhere.
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: Thu, 4 Jan 2001 09:19:59 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Perl problem resolution checklist (was Re: General Personal Development Strategy)
Message-Id: <slrn9591kf.mil.tadmc@magna.metronet.com>
John Hall <jhall@ifxonline.com> wrote:
>I see a lot of "you work stupid" and "RTFM" on this list.
Those are _responses_.
If you see a lot of those, then you also see a lot of people
going round-and-round trying to get what they want, and
involving hundreds/thousands of others in the festivities,
instead of spending 10 minutes sleuthing in the standard docs.
We see them too. It is a huge waste of global programmer time.
So when we see it happen yet again, we are quick to point out
that there is a Much Better Way.
>I am curious if someone can give me a more constructive method/procedure for
^^^^^^^^^^^^^^^^^
>figuring out ways of writing perl code.
What you were told (by me anyway), i.e. "check the docs", was
*hugely* constructive, you seem to be implying that it was not.
You were given the golden egg of "what" you should do to make
your life as a programmer easier.
If you also want the "how", then feel free to ask, but don't
disparage being given the "what" in the first place, it is
crucial to even getting to the "how" part.
Finding out "how to" get something done programming-wise is
a treasure hunt. You start with one "clue" which leads you
somewhere where you find another clue that leads you yet
further. If you miss or disregard some clues, then you are
taking the long way to the treasure (or missing it altogether).
There is some observing of "spore" that trackers (programmers)
should know about in order to effectively practice their craft.
Some examples are: what "domain" is involved (language, application,
OS, environment ...), names of the functions available, what
docs are available, etc...
There is a "work in progress" that discusses how to mine information
from Perl's standard docs at:
http://www.xray.mpe.mpg.de/cgi-bin/extract-mbox/perl5-porters/2000-05?
25048%2E957207786%40chthon
(line break and spaces inserted in really long URL)
>and buying a _not so
>excellent_ perl book.
This is very easy to do, as *most* Perl books are far from excellent.
Perl is popular. There are plenty of shysters out to get a piece of
the pie (or maybe "inepts" would be a more charitable characterization).
Be careful buying Perl books. Research them first (there are FAQs,
other standard docs and several web sites) by finding some reviews
and opinions, don't "browse the bookstore shelf" in order to choose
a Perl book.
>I needed to figure out how to spit out a date gleaned from localtime()
Somehow or another you found out about localtime(). That is good,
as you could have gotten what you needed starting from there, as
described below.
>and
>make sure it always had a 2 digit length. [IE 09 instead of 9 for september,
>after adding 1 of course]
For those playing along at home, how you start with just "I want
a nicely formated date" to finding out that there is a localtime()
function?
You first see if there are any Perl FAQs that mention dates:
perldoc -q date
Then you go read them.
The "How do I find yesterday's date?" FAQ mentions both time()
and localtime().
>I read perldoc -f localtime,
Now we pick up the story where you came in :-)
>which didn't address my issue
^^^^^^^^
But it does address an issue that you didn't even know you had.
>[as far as I can
>tell? It only showed me a few pages of stuff I had already gleaned from
>looking at another piece of code]
It did not answer your question (which was really "how do I zero-pad
a number?") directly, but there were clues there that would have
led you to the answer.
Did you glean your "($year-100)" part from that "piece of code"?
[ using Perl code from "on the web" is most perilous, there are
lots of strange/ugly/bad/unsecure programs that are "popular".
]
If you had read and understood the description of localtime()
you wouldn't have used that. If you don't understand something
in the docs, feel free to post a question about what the docs say.
---------------------------------
And to get the last two digits of the year (e.g., '01' in 2001) do:
$year = sprintf("%02d", $year % 100);
---------------------------------
Now you know how to get the last 2 digits of the year, but you
didn't do it that way.
You also notice that there is a sprintf() function mentioned there,
so you
perldoc -f sprintf
---------------------------------
Perl permits the following universally-known flags between the C<%>
and the conversion letter:
...
0 use zeros, not spaces, to right-justify
---------------------------------
Viola! "how to zero pad a number" solved.
>And I didn't know about the function
>printf,
Seems you missed/disregarded the sprintf() clue...
>Of course I am interested in learning the "right way", so I read everything
>on this list that I can understand.
That is an effective adjunct to combing the standard docs.
>In a nutshell, how do I get from "I need this data to print out always as 2
>characters" to "perldoc -f printf" -
See above :-)
>What tools did you people use when you
>were starting out?
grep(1) and Perl newsgroups.
>Will the fact that I don't know C cripple me?
No, but it might make you limp a bit.
Not knowing _any_ other programming language at all may require
the use of a cane, walker, or even wheel chair though :-)
>Are there any
>preferred sites that have useable search features, that will work for me as
>I am developing an understanding of the terminology?
"Stuff on the web" has high probablility of being more hurtful
than helpful. You must pay attention to the quality of what
you take, which is Really Hard when you don't know what
"quality" is with regards to the language you are learning.
>would probably help me more than 100 people
>saying "perldoc -f
>thsfunctionthatialreadyknewaboutandiamjustusingperldoctoseehowthesyntaxworks
>!"
Ah but you didn't fully "alreadyknewabout". You went right
past the answer you were seeking.
I've posted this checklist before, but here it is again anyway.
Maybe it will help:
----------------------------------
Perl problem resolution checklist:
----------------------------------
1) check the Perl FAQs
(word search with "perldoc -q". Or better, find where the
*.pod's are on your system, and word search (grep) the
entire contents of the files)
2) expand the above to _all_ of the standard *.pod files.
3) check a Usenet archive such as www.deja.com (use "Power Search").
4) check books and websites (this step is optional)
5) write a Usenet article, but don't post it yet!
5a) make a small and complete program that people can execute
that shows your problem.
5b) state how the program's output is not what you want. Describe
what you want.
5c) repeat steps 1-4 using search terms taken from your description
of the problem or your Subject header (try some synonyms for
the terms also)
6) Give up on a quick answer. Post to Usenet for a slow answer.
7) wait hours/days/forever for followups with answers rather than
than the 5 or 10 minutes it would have taken if steps 1-3
had worked.
8) Wonder at the quality of the answers given, rather than know
it is a peer-reviewed, validated answer if steps 1-2 had worked.
9) Repeat steps 1-3 many times for many problems. You will seldom
get past step 3, and even less often get past step 5a.
10) Now that you know so much, go *answer* some questions on Usenet :-)
-----
To help with 1 and 2 above, I make "headlines" files to grep in,
because sometimes there is Too Much Information when grepping
the entire bodies:
cd /an/INC/dir/pod/
grep '^=' perlfaq[1-9].pod >faq.heads
grep '^=' *.pod >all.heads
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 5240
**************************************