[13832] in Perl-Users-Digest
Perl-Users Digest, Issue: 1242 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 1 12:05:49 1999
Date: Mon, 1 Nov 1999 09:05:14 -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: <941475914-v9-i1242@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 1 Nov 1999 Volume: 9 Number: 1242
Today's topics:
<STDIN> to a @ <r00tz@ciudad.com.ar>
Re: <STDIN> to a @ <jtolley@bellatlantic.net>
Re: <STDIN> to a @ (Randal L. Schwartz)
Re: <STDIN> to a @ <lr@hpl.hp.com>
Re: Can this be made faster? <22pb22@excite.com>
Re: close() is expensive <sakalauk@ssc.usm.edu>
Re: close() is expensive <uri@sysarch.com>
convert a perl tree into a C tree <leberre@convergence.de>
Re: convert a perl tree into a C tree <rhomberg@ife.ee.ethz.ch>
Re: decode $ENV{'HTTP_WEFERER'}? <gellyfish@gellyfish.com>
Deleting line in a file. <steven@*REMOVE*filipowicz.com>
help with if,elsif pooh23@my-deja.com
Re: How can I handle "out of memory" error? (Abigail)
Re: How can I handle "out of memory" error? (Kragen Sitaker)
Re: How to execute pattern match command at Unix prompt <Achin@inprise.com>
Re: It is always like this here? <flavell@mail.cern.ch>
Re: It is always like this here? <bivey@teamdev.com>
Re: It is always like this here? <bivey@teamdev.com>
Lightweight perl web server for win9x? <seyed@kmpinternet.com>
Re: Lightweight perl web server for win9x? <scotnet@sympac.com.au>
Re: mod perl anomalies (I.J. Garlick)
Re: mod perl anomalies (I.J. Garlick)
Re: multiline editing <gellyfish@gellyfish.com>
Re: Need cgi script <trot@cam.org>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 30 Oct 1999 01:07:54 -0300
From: "morpheus" <r00tz@ciudad.com.ar>
Subject: <STDIN> to a @
Message-Id: <7vdq7e$mkt$1@ul3.satlink.com>
I need to get 8 letters from the user and put each one of them in a
different part of an array (
@array[0] = m;
@array[1] = d;
...
Anybody could help me?
------------------------------
Date: Mon, 01 Nov 1999 16:11:01 GMT
From: James Tolley <jtolley@bellatlantic.net>
Subject: Re: <STDIN> to a @
Message-Id: <381DBB0A.19172A13@bellatlantic.net>
morpheus wrote:
> I need to get 8 letters from the user and put each one of them in a
> different part of an array (
> @array[0] = m;
> @array[1] = d;
> ...
> Anybody could help me?
# if the letters are in one word/argument one the command line.
@a = split /|/,$ARGV[0];
print map {"$_: $a[$_]\n"} (0..$#a);
# if the letters are given on the command line as individual arguments,
then:
@a = @ARGV; # works fine.
print map {"$_: $a[$_]\n"} (0..$#a);
hth,
James
------------------------------
Date: 01 Nov 1999 08:36:46 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: <STDIN> to a @
Message-Id: <m11zaauq1t.fsf@halfdome.holdit.com>
>>>>> "morpheus" == morpheus <r00tz@ciudad.com.ar> writes:
morpheus> I need to get 8 letters from the user and put each one of them in a
morpheus> different part of an array (
morpheus> @array[0] = m;
morpheus> @array[1] = d;
morpheus> ...
morpheus> Anybody could help me?
This has been answered in comp.lang.perl.modules, please see there.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Mon, 1 Nov 1999 08:48:33 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: <STDIN> to a @
Message-Id: <MPG.1287643c65e564b98a16e@nntp.hpl.hp.com>
In article <381DBB0A.19172A13@bellatlantic.net> on Mon, 01 Nov 1999
16:11:01 GMT, James Tolley <jtolley@bellatlantic.net> says...
> morpheus wrote:
>
> > I need to get 8 letters from the user and put each one of them in a
> > different part of an array (
> > @array[0] = m;
> > @array[1] = d;
> > ...
> > Anybody could help me?
>
> # if the letters are in one word/argument one the command line.
> @a = split /|/,$ARGV[0];
I know that works the way you want it too -- split on every character.
It just looks so much like a common programming trap (split on vertical
bar) that I find it grating. Can anyone defend writing anything but //
for the 'split on null string' regex?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 1 Nov 1999 08:03:54 -0800
From: "PB" <22pb22@excite.com>
Subject: Re: Can this be made faster?
Message-Id: <7vkdl7$t6b$1@fir.prod.itd.earthlink.net>
Thanks for all your input.
I will test the proposed methods and let you know which one turns out best.
cheers,
pb
Kragen Sitaker <kragen@dnaco.net> wrote in message
news:Zq8T3.15786$23.851106@typ11.nn.bcandid.com...
> In article <381CD0D5.7B879432@sympatico.ca>,
> Ala Qumsieh <qumsieh@sympatico.ca> wrote:
> >PB wrote:
> >> foreach $line (@line){
> >> if ($line =~ /\s$string\s/oi) {$count++;}
> >> }
> >
> >Your main problem is that you read the every file completely into
> >memory (the array @line), and then you iterate through the elements
> >of @line. This makes two iterations; one of which is unnecessary.
> >
> >I believe the following should be faster, but I didn't benchmark:
> >
> >my $count = 0;
> >for my $file (@files) {
> > open F, $file or die $!;
> > while (<F>) {
> > $count += () = /(\s$string\s)/goi;
> > }
> > close F or die $!;
> >}
>
> FWIW, your program will give different results than his -- if
> \s$string\s happens more than once per line -- and it may actually be
> slower because of the ().
>
> One solution to making it faster might be this:
>
> #!/usr/bin/perl -w
> use strict; my $string = 'you'; my @files = @ARGV;
> my $count = 0;
> for my $file (@files) {
> open F, "<$file" or die "Opening $file: $!\n";
> $_ = do {local $/; <F>};
> $count += () = /^.*\s$string\s.*$/goim;
> }
> print "count: $count\n";
>
> The first couple of lines and the last line are just there to help me
> test it. This will read in the whole file, just as before, but will
> pattern-match on the whole file all at once instead of on each line.
> The pattern will match a whole line, so you'll only get one match per
> line, just as in your original script (but unlike Ala's.) If that's
> not what you want, of course you can take the ^.* and .*$ out.
>
> Benchmark this on your data and let us know if this is a faster
> method. Also try studying $_ before doing the pattern match.
> (Studying the filename won't help.)
>
> btw, if you're looking for occurrences of a word, you might try
> bracketing it with \b instead of \s -- that way you'll get words at the
> beginning and end of lines, and with punctuation, etc.
>
> I got this idea from lt lindley, who submitted something similar as a
> context-grep contest entry. (I'd used something similar before for
> comment-stripping in C and C++, but didn't usually think of this as a
> possibility.)
> --
> <kragen@pobox.com> Kragen Sitaker
<http://www.pobox.com/~kragen/>
> Thu Oct 28 1999
> 12 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 01 Nov 1999 09:46:37 -0600
From: Peter Sakalaukus <sakalauk@ssc.usm.edu>
Subject: Re: close() is expensive
Message-Id: <381DB5DD.633F2F34@ssc.usm.edu>
> >I wrote a script to parse a data file and write out 1 record at a time
> >to a temporary file. Via a system() call, another program is run with
> >the temporary file as the input.
> >
> >By removing the close OUT; statement from my code, it ran significantly
> >faster. Why is close() so costly?
As the general consensus is that close() is not as expensive as I was
seeing, I switched the close and system commands.
Doing: close(OUT); system("another_program"); is *very* time consuming.
Doing system("another_program"); close(OUT); is not. In fact, this 2nd
piece of code runs at about the same speed as just:
system("another_program");.
Anyone care to venture a guess?
...Pete
---------------------------------------------------------------
Actual code sample:
if($fdata[$i] =~ /88888/)
{
$bt = join ' ', $fdata[$i] =~
/^([[\s*\d+\/?\s*]+[a-zA-Z]{4,6}|[\s*\d+\/?\s*]+)/;
open(OUT, ">/tmp/bt.$$");
print OUT "JJXX $bt\n";
#close(OUT);
system("parser.e /tmp/bt.$$");
#close OUT;
}
------------------------------
Date: 01 Nov 1999 11:18:46 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: close() is expensive
Message-Id: <x77lk2b2xl.fsf@home.sysarch.com>
>>>>> "PS" == Peter Sakalaukus <sakalauk@ssc.usm.edu> writes:
PS> Doing: close(OUT); system("another_program"); is *very* time consuming.
PS> Doing system("another_program"); close(OUT); is not. In fact, this 2nd
PS> piece of code runs at about the same speed as just:
PS> system("another_program");.
PS> Anyone care to venture a guess?
yes. it is very obvious.
PS> open(OUT, ">/tmp/bt.$$");
PS> print OUT "JJXX $bt\n";
this only prints to the stdout buffer. other programs won't see the text yet.
PS> #close(OUT);
this close will flush the buffer to the actual file.
PS> system("parser.e /tmp/bt.$$");
this will only take time to parse if there is text in the real file.
PS> #close OUT;
this is too late for the parser to see any text.
so close is not the problem. close is not know for being a slow op. the
most it will ever do is flush the last buffer and close the handle.
did you test whether your parser did any work in both cases? it would
have easily shown you why there is a difference.
also next time post code as you first posts about slow close made no
sense. now it does, even though it is not the actual cause of the
slowdown.
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: Mon, 01 Nov 1999 15:24:29 +0100
From: Claude Le Berre <leberre@convergence.de>
Subject: convert a perl tree into a C tree
Message-Id: <381DA29D.DB2AD27F@convergence.de>
I have programmed a perl script that parse an XML file (the syntax of my
file is XML, but the format is near from
XML Schema (or RDF), so it's not XML).
I have to integrate this perl script into a GUI (GTK), so I used the
possibility of embedding Perl in C.
Now, I can call my perl parsing script, but the problem of retrieving
the perl tree structure into my C program is not solved,
and seems not to be so easy.
So my question is the following :
Is there a possibility to convert my perl tree (using hashes) into a C
tree (using struct) without having to write to much code.
If someone still did this, could he give more explanations on this, or
give me
the reference of a page where I can find more info on this.
Thanks.
Claude
------------------------------
Date: Mon, 01 Nov 1999 16:59:52 +0100
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: convert a perl tree into a C tree
Message-Id: <381DB8F8.12466CB9@ife.ee.ethz.ch>
Claude Le Berre wrote:
>
> I have programmed a perl script that parse an XML file (the syntax of my
> file is XML, but the format is near from
> XML Schema (or RDF), so it's not XML).
> I have to integrate this perl script into a GUI (GTK), so I used the
> possibility of embedding Perl in C.
> Now, I can call my perl parsing script, but the problem of retrieving
> the perl tree structure into my C program is not solved,
> and seems not to be so easy.
>
> So my question is the following :
> Is there a possibility to convert my perl tree (using hashes) into a C
> tree (using struct) without having to write to much code.
> If someone still did this, could he give more explanations on this, or
> give me
> the reference of a page where I can find more info on this.
Cool. I just did the opposite (parsing a file with C and then converting
the struct to perl)
As I did not find anything useful I wrote some helper files.
I think they can rather easily be converted (extended) from C-to-Perl to
Perl-to-C
The script needs a descriptor for a struct in Perl and generates
conversion functions that create complex Perl structures.
It uses C++ because it does everything with overloading.
By converting all the hash stores to hash lookups, I'm confident that it
could be easily extended so that the conversion works both ways.
Tell me if you're interested
- Alex
------------------------------
Date: 1 Nov 1999 13:14:21 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: decode $ENV{'HTTP_WEFERER'}?
Message-Id: <381d922d_2@newsread3.dircon.co.uk>
Vadim Kulakov <vadim@sns.ru> wrote:
> Abigail wrote:
>
>> ## How can I decode the string (Apache/1.3.4 (Unix)):
>> ## HTTP_WEFERER=HYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTT
>> You'll have to ask the wabbits.
>
> When an user connect thru proxy server - HTTP_REFERER has null string, but
> HTTP_WEFERER, according to its length, has encoding HTTP_REFERER.
> How can I get previous user's location else?
I think the point is that you will have to refer to the documentation
for the proxy in question as we have no idea how this is encoded - also
you might search in Deja News for discussions about the usefulness of
HTTP_REFERER.
/J\
--
"Teletext - the information super B-road" - Exclusive, Channel 5
------------------------------
Date: Mon, 01 Nov 1999 13:07:15 +0100
From: Steven <steven@*REMOVE*filipowicz.com>
Subject: Deleting line in a file.
Message-Id: <941457909.11512.0.pluto.c30bf8a6@news.demon.nl>
Hi All!
I have a file that contains some line's like this :
----------------- Mailalias file ---------------------
steven@filipowicz.com steven@domain.com
steven3@filipowicz.com steven3@domain.com
steven4@filipowicz.com steven4@domain.com
steven6@filipowicz.com steven6@domain.com
------------------------------------------------------
Now I want to delete, let's say the line : steven4@filipowicz.com
steven4@domain.com
Here is a part of the code, I've got it so far that the program can find
the line
that I want to delete. But how do I go futher, so that the line is
delete and
the file is rewriten.??
------------------------------------------------------------------------------
$mailalias_file = "/opt/guide/www.filipowicz.com/mailalias";
$mailadres_in = "steven4@filipowicz.com";
$mailalias_out = "steven4@domain.com";
$joined_mailalias = join '', "$mailadres_in " , " $mailalias_out";
# Begin the Editing of the Mailalias File
open (MAILALIAS,"$mailalias_file") || die "Can't Open $mailalias_file:
$!\n";
@LINES=<MAILALIAS>;
close(MAILALIAS);
$SIZE=@LINES;
# Open Link File to Output
open (MAILALIAS,">$mailalias_file") || die "Can't Open $mailalias_file:
$!\n";
for ($i=0;$i<=$SIZE;$i++) {
$_=$LINES[$i];
if (/$joined_mailalias/) {
print "Content-type: text/html\n\n";
print <<"END";
FOUND -> $joined_mailalias
END
}
}
close (MAILALIAS);
------------------------------------------------------------------------------
Any help is welcome!
Thanks!
O, How would Use flock on the file?
------------------------------
Date: Mon, 01 Nov 1999 16:03:45 GMT
From: pooh23@my-deja.com
Subject: help with if,elsif
Message-Id: <7vkdkt$6bk$1@nnrp1.deja.com>
Hi,
I'm trying to convert asp code to perl. I have a webpage
<http://www.uwex.edu/ces/shwec/specialist.htm> that uses the drop down
box. Based on what the user selects, it displays a webpage. It was
working find on a MIIS, but when we move the site to a unix server, the
asp didn't work.
this is what the code looks like so far in perl:#!/usr/bin/perl
print "Content-type:text/html\n\n";
#conditions
$varname = value
if ($varname eq "0") {
...do stuff here if the condition is true
}
elsif ($varname eq "1") {
...do other stuff
}
elsif ($varname eq "2") {
...do other stuff
}
elsif ($varname eq "3") {
...do other stuff
}
elsif ($varname eq "4") {
...do other stuff
}
elsif ($varname eq "5") {
...do other stuff
}
elsif ($varname eq "6") {
...do other stuff
}
elsif ($varname eq "7") {
...do other stuff
}
elsif ($varname eq "8") {
...do other stuff
}
elsif ($varname eq "9") {
...do other stuff
}
elsif ($varname eq "10") {
...do other stuff
}
elsif ($varname eq "11") {
...do other stuff
}
else {
...do this if none of the other conditions are met
}
I'm a beginner at this. I'm not sure how to say display this page. I
use the redirect response in asp.
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 1 Nov 1999 06:11:22 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: How can I handle "out of memory" error?
Message-Id: <slrn81r0q6.66b.abigail@alexandra.delanet.com>
Hoseop Ahn (hsahn@kaist.ac.kr) wrote on MMCCLIII September MCMXCIII in
<URL:news:7vjdrg$60l$1@green.kreonet.re.kr>:
?? I want to know if the request for large memory will fail
?? before the program dies with message:
?? Out of memory during "large" request for xxxxx bytes
??
?? It must go on after logging that failure.
??
?? How can I do this?
Well, it's unclear what you mean by "go on". In general, that will not
be possible. However, as perldiag will tell you, this error is fatal,
yet trappable.
Perhaps your best bet is making sure you won't run out of memory.
Abigail
--
sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
$y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 01 Nov 1999 14:48:40 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: How can I handle "out of memory" error?
Message-Id: <cLhT3.16283$23.914299@typ11.nn.bcandid.com>
In article <7vjdrg$60l$1@green.kreonet.re.kr>,
Hoseop Ahn <hsahn@kaist.ac.kr> wrote:
>I want to know if the request for large memory will fail
>before the program dies with message:
> Out of memory during "large" request for xxxxx bytes
>
>It must go on after logging that failure.
>
>How can I do this?
eval will let you go on after logging the failure, but nothing will let
you see if the request will fail before it happens.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Thu Oct 28 1999
12 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 01 Nov 1999 18:59:24 +0800
From: Adrian Chin <Achin@inprise.com>
Subject: Re: How to execute pattern match command at Unix prompt ?
Message-Id: <381D728C.81D9BCE6@inprise.com>
Hi
I got it, it's actually
perl -e <expression>
Thanks
Martien Verbruggen wrote:
> On Mon, 01 Nov 1999 17:16:14 +0800,
> Adrian Chin <Achin@inprise.com> wrote:
> > Hi
> >
> > Do you know how to execute a let's say
> >
> > /^1$/ <filename>
> >
> > at the prompt ??
>
> How would that execute? It would give you a few errors at the prompt.
>
> > Just like grep command ?
>
> I'm sorry.. I really have no idea what you are talking about. You say
> you want to 'execute a pattern match command at [the] Unix prompt', and
> then you say something like 'Just like grep command'.
>
> Let me try a wild stab here: Are you trying to duplicate the
> functionality of grep?
>
> # man perlop
> [snip]
> # poor man's grep
> $arg = shift;
> while (<>) {
> print if /$arg/o; # compile only once
> }
> [snip]
>
> This doesn't have all the functionality of grep, but you could expand it
> a little.
>
> There have also been some grep-like scripts posted to this group in the
> past. Use www.deja.com to find them.
>
> If that is not what you mean, then please post again, but try to phrase
> your question a bit clearer.
>
> Martien
> --
> Martien Verbruggen |
> Interactive Media Division | Freudian slip: when you say one thing
> Commercial Dynamics Pty. Ltd. | but mean your mother.
> NSW, Australia |
------------------------------
Date: Mon, 1 Nov 1999 12:05:16 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: It is always like this here?
Message-Id: <Pine.HPP.3.95a.991101120156.16161D-100000@hpplus01.cern.ch>
On 1 Nov 1999, Martien Verbruggen wrote:
> If the people who know the correct answer don't post, then someone who
> doesn't will.
True. Unfortunately, even though people who _do_ know the correct
answer are posting, the ones who don't are still posting their wrong
answers.
You have to wait and see whether they get abusive when the problem is
pointed out, then you can be sure they're wrong.
------------------------------
Date: 1 Nov 1999 16:45:29 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: It is always like this here?
Message-Id: <01bf2488$bb20bba0$3527e1ce@bill.jump.net>
Jonathan Stowe <gellyfish@gellyfish.com> wrote in article
<7vcvr8$3e7$1@gellyfish.btinternet.com>...
> Lets swing this pointless thread around a little.
>
> So you dont think that people make applications in Perl ?
I can't believe you missed the point by so much... Amazing.
Anyway, to elaborate, application-related newsgroups (like
game programmer groups, for example) seem less likely to
jump on someone no matter how stupid or off-topic the post.
(Well, OK, anyone posting ebay auction notices deserves what
they get.) They are more likely to be gently nudged into
rational thought patterns than to be flamed. (Or at least
half the responses will be somewhat gentle about it :-)
Surprisingly, some of them come back later with much more
realistic expectations. (Like, "Yeah, I see now that I better
learn a programming language before setting out on my quest
to create Sim Everything.")
BTW I once answered a question in a C language group -
accurately - and garnered almost a week's worth of vitriole
for the sin of accidentally commenting a line with //.
-Wm
------------------------------
Date: 1 Nov 1999 16:57:09 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: It is always like this here?
Message-Id: <01bf248a$5e67a200$3527e1ce@bill.jump.net>
David Cassell <cassell@mail.cor.epa.gov> wrote in article
<381A19F3.6041D20A@mail.cor.epa.gov>...
> William wrote:
> I find that the cluelessness in the app-creation newsgroups
> is about as bad, but most of it is on-target. The poster is
> in the right newsgroup, and is asking a nearly-relevant
> question. You cannot count on either of those here, and
> the people who ask in the wrong newsgroup are often unwilling
> to take advice which runs counter to their [incorrect]
> guess. This leads to bad behavior all around.
I don't know about that. I see an awful lot of language-
specific questions in application newsgroups. (If it's a
language that is commonly used in creating the application
of interest, then it usually gets politely answered,
albeit with an admonition that checking the language
group might be a better way to go.) Heck, I've seen lots
of "what program do I use to make a program" questions
too - how clueless a question is that for a programming
newsgroup? (Yet, it frequently gets a response with some
helpful URLs.) -Wm
------------------------------
Date: Mon, 1 Nov 1999 13:40:56 -0000
From: "Seyed Razavi" <seyed@kmpinternet.com>
Subject: Lightweight perl web server for win9x?
Message-Id: <7vk56d$cl2$1@soap.pipex.net>
Hi,
This may not be the right place or it may already be answered somewhere so
could you pont me in the right direction?
I'm looking for a small, lightweight web server to run a simple perl
application on my home Windows 98 machine. I would like it to be easily
configurable and not hog resources (so no Apache or IIS).
--
Cheers,
Seyed
------------------------------
Date: Tue, 02 Nov 1999 01:25:10 +1100
From: Scotty <scotnet@sympac.com.au>
Subject: Re: Lightweight perl web server for win9x?
Message-Id: <381DA2C6.7149A138@sympac.com.au>
--------------41F5E5291E73276C9F0B6028
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Seyed,
I use just such a thing myself, it's perfect for devloping you
perl scripts for the web on your homw system. i run Win98 and use Xitami web
server. It have a GUI to configure with and i also have perl5 for win32
installed.
You can get the Xitami Web Server from:
http://www.imatix.com/
This is the exact download URL:
http://www.imatix.com/html/xitami/index2.htm#download
------------------------------------------
You want the Current Production Release: |
bw3224d3.exe-[790 Kb] |
------------------------------------------
You can get Perl for Win 32 from Here:
http://www.activestate.com/ActivePerl/
If you need any help setting up the Xitami Web Server just ask.
Scott Laughton.
----------------------------------------------------------------------------
passme
Seyed Razavi wrote:
> Hi,
>
> This may not be the right place or it may already be answered somewhere so
> could you pont me in the right direction?
>
> I'm looking for a small, lightweight web server to run a simple perl
> application on my home Windows 98 machine. I would like it to be easily
> configurable and not hog resources (so no Apache or IIS).
>
> --
> Cheers,
>
> Seyed
--------------41F5E5291E73276C9F0B6028
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Seyed,
<br>
I use just such a thing myself, it's perfect for devloping you perl scripts
for the web on your homw system. i run Win98 and use Xitami web server.
It have a GUI to configure with and i also have perl5 for win32 installed.
<p>You can get the Xitami Web Server from:
<br><A HREF="http://www.imatix.com/">http://www.imatix.com/</A>
<p>This is the exact download URL:
<br><A HREF="http://www.imatix.com/html/xitami/index2.htm#download">http://www.imatix.com/html/xitami/index2.htm#download</A>
<br><tt>------------------------------------------</tt>
<br><tt>You want the Current Production Release: |</tt>
<br><tt>bw3224d3.exe-[790 Kb]
|</tt>
<br><tt>------------------------------------------</tt>
<p>You can get Perl for Win 32 from Here:
<br><A HREF="http://www.activestate.com/ActivePerl/">http://www.activestate.com/ActivePerl/</A>
<p>If you need any help setting up the Xitami Web Server just ask.
<p>Scott Laughton.
<br>----------------------------------------------------------------------------
<br>passme
<br>Seyed Razavi wrote:
<blockquote TYPE=CITE>Hi,
<p>This may not be the right place or it may already be answered somewhere
so
<br>could you pont me in the right direction?
<p>I'm looking for a small, lightweight web server to run a simple perl
<br>application on my home Windows 98 machine. I would like it to
be easily
<br>configurable and not hog resources (so no Apache or IIS).
<p>--
<br>Cheers,
<p>Seyed</blockquote>
</html>
--------------41F5E5291E73276C9F0B6028--
------------------------------
Date: Mon, 1 Nov 1999 16:16:59 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: mod perl anomalies
Message-Id: <FKJ18C.Ew@csc.liv.ac.uk>
In article <1x+KmBAkyNG4Ew8p@tnunn.demon.co.uk>,
Thomas Nunn <tom@tnunn.demon.co.uk> writes:
>>This happened to me when I first tried to use mod_perl (I just dived in
>>and tried to run before I had even relised crawling may have been a better
>>bet).
>>
>
> I wish I had time for crawling, I don't think my boss would be amused
> however.
It's faster in the long run. :-)
> That would probably be very useful, but I'm still confused. I was led to
> believe that if I declare all my variables as being local, they should
> all die as soon as that particular script has finished running. Why
> would these values still be in memory?
Normally it does. But when your using mod_perl the process that runs your
CGI is the httpd pprocess it's self. Since this hangs around for 30 odd
requests before killing it's self and starting a fresh process usually you
can see how it may hang on to values. Like $_, $/, $1...., @_ etc... do
you local all them? According to the way I understand it. If you put
something in $_ towards the end of the script. The httpd process hangs
onto it and may use the value in $_, next time it's used, if you are not
careful. This is what got me the first time I tried mod_perl, I think.
>
> ...Unless of course the script doesn't finish running.. Aha that could
> be it..
Yep effectively although probably not the way you think. As brian said it
took several re-reads to grasp this let alone understand it.
--
Ian J. Garlick
ijg@csc.liv.ac.uk
Somehow, the world always affects you more than you affect it.
------------------------------
Date: Mon, 1 Nov 1999 16:23:54 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: mod perl anomalies
Message-Id: <FKJ1Ju.Iq@csc.liv.ac.uk>
In article <brian-ya02408000R2810990636280001@news.panix.com>,
brian@smithrenaud.com (brian d foy) writes:
> this is covered in the mod_perl traps documentation that is included
> in the mod_perl distribution. make sure you read the included docs
> and FAQs as you play with mod_perl. it might take several reads :)
It did. :-) (And several more to start understanding it as applied to what
I had tried before.)
> it's only random in so far as the particular httpd child process
> that handles the request. as an aid to debugging, it's wise to include
> the PID in the debugging output so you know which child handled the
> request.
Dman jow come ebryones else can explain things so much better than what I
can explain them. :-)
Magic idea. Thanks brian. (the $$ thing).
> also, if you are changing modules around, you will want to enable
> StatINC checking, or restart the server. mod_perl should automatically
> detect changes in scripts though.
So I believe. Not what I experienced, but then I think the sysadmin
setting this up for me had just as much of a clue as I did. (blind leading
the blind springs to mind.)
--
Ian J. Garlick
ijg@csc.liv.ac.uk
Somehow, the world always affects you more than you affect it.
------------------------------
Date: 1 Nov 1999 14:09:42 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: multiline editing
Message-Id: <381d9f26_1@newsread3.dircon.co.uk>
Eric Smith <eric@fruitcom.com> wrote:
> I was appealing in the comp.lang.python group for an equivalent to my
> favourite method of prototyping in perl i.e.
> perl -e '..multiline.."
> Someone came back with the suggestion of a here-documnet in zsh - this
> works great but can someone tell me how I may get it to work in perl if at
> all.
Because Perl will read a program from its STDIN you can easily do this
with a her document :
[pigment.dircon.net] $ perl <<EEE
> use strict;
>
> print "Hello, World!\n";
> EEE
Hello, World!
Easy ! however it will necome a little more difficult if you want to use
filname arguments to your program thus entered - but hey its your idea
you work it out ...
/J\
--
"Boring: See Civil Engineers" - Yellow Pages
------------------------------
Date: Mon, 01 Nov 1999 11:19:31 -0500
From: Trottinette <trot@cam.org>
Subject: Re: Need cgi script
Message-Id: <381DBD8B.13E90478@cam.org>
this should be very easy.
do you program yourself or do you need someone to do it for you?
--
|| | | n i c o l a s b e r t r a n d
|| | | http://www.cam.org/~trot
|| | |
|| Uejgqco hl muqafumu k, ngiuo u p'lgrazsso hbahkgaw.
|| | |
--
------------------------------
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 1242
**************************************