[7941] in Perl-Users-Digest
Perl-Users Digest, Issue: 1566 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 2 04:07:32 1998
Date: Fri, 2 Jan 98 01:00:24 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 2 Jan 1998 Volume: 8 Number: 1566
Today's topics:
Re: Avoiding regular expressions (was: Re: Newbie quest (brian d foy)
Re: bulk mail (brian d foy)
Re: chomp ($&) to remove specific \n <webmaster@fccj.cc.fl.us>
Re: Finding the TITLE to a HTML page <joseph@5sigma.com>
Re: htmlcolorizer4U (brian d foy)
i am a newbie <star@sonic.net>
Re: i am a newbie (brian d foy)
Re: LWP SSL POST requests <webmaster@fccj.cc.fl.us>
Re: LWP SSL POST requests <webmaster@fccj.cc.fl.us>
need help with pattern match <smoothie@spiritone.com>
Re: need help with pattern match (brian d foy)
Re: Need script to preview form data prior to submittin (brian d foy)
perl is c worsened (was: Re: word wrap routine) <*@qz.to>
Re: Perl not Y2K compliant (brian d foy)
Re: Perl not Y2K compliant (Abigail)
Re: Perl not Y2K compliant (brian d foy)
Re: PERL programmer needed. (brian d foy)
Perl Trick? <eddie@NOSPAMMING.cs.odu.edu>
Re: Perl5 on NT4 with IIS4 <webmaster@fccj.cc.fl.us>
Re: Simple(!) regular expression problem <admin@vsgcom.com>
Re: Why this QUERY_STRING is empty? (brian d foy)
Writing a "nice" server? plambert$1@plambert.org
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 02 Jan 1998 01:38:18 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Avoiding regular expressions (was: Re: Newbie question)
Message-Id: <comdog-ya02408000R0201980138180001@news.panix.com>
Keywords: from just another new york perl hacker
In article <Pine.GSO.3.96.980101120721.19455I-100000@user2.teleport.com>, Tom Phoenix <rootbeer@teleport.com> wrote:
>On Wed, 31 Dec 1997, Joseph Cotton wrote:
>
>> I'm new to perl, too, and I retch at the sight of such code. Can any
>> one of you nice perl nerds create a series of functions to format
>> strings and numbers, so I can format things like I am able to in some
>> more civilized languages, that is, with out the use of a tilde and
>> slashes =~s/u/c/k/s; I am not judgemental, this is just my own humble
>> opinion. I believe in "each to his own", and I could be much more
>> productive without tildes.
it sounds like the struggle between getting work done right now
versus losing some time in learning a new tool and saving time in
the log run. you could probably be much more efficient right now
without the tildes, but in the long run, i think that you will find
that your universe is greatly expanded (and made more tractable) by
them.
>Perl isn't the right language for everyone; maybe you should consider
>learning another language that better suits the way you think.
huh? [this seems like a strange comment from this source. where's
Tom and what have you done to him?]
when i started with Perl, it took me a long time to wrap
my mind around regular expressions. (it still takes me awhile to
fully appreciate a no-holds-barred Elijah concoction). same thing
with C and pointers. same thing with reduction-oxidation reactions
in chemistry. that didn't cause me to give up on any of them though -
i just ignored them for awhile and when i felt brave i would try a
little bit. once i was comfortable with that bit, i could try more.
after awhile they weren't so disgusting. some things have steep
learning curves and one needs to take breaks. and not everything
can be learned in one pass.
one doesn't have to use all of Perl's features, but can add to one's
toolbox of skills gradually. given a bit of experience with Perl,
regexes will start to seem less and less threatening. until then,
Perl can still glue together bits of sed or awk. :)
--
brian d foy <comdog@computerdog.com>
Institute For the Organically-Challenged
<URL:http://computerdog.com/brian/Institute.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Fri, 02 Jan 1998 01:23:10 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: bulk mail
Message-Id: <comdog-ya02408000R0201980123100001@news.panix.com>
Keywords: from just another new york perl hacker
In article <mbudash-0101981657100001@d67.pm9.sonic.net>, mbudash@sonic.net (Michael Budash) wrote:
>In article <68fd2s$3g8@bgtnsc02.worldnet.att.net>, comdog@computerdog.com
>(brian d foy) wrote:
>
>>>
>>> sendmail questions are best asked in alt.fan.e-t-b
>>>
>
>interesting...eli has his own newsgroup? guess i'll subscribe and check it
>out...thanks! (don't worry, brian, i'll lurk a _long_ time before i post!)
not only does the newsgroup exist, but it's the best place to ask
really sticky regular expression questions. no need to lurk :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 1 Jan 1998 23:19:35 -0500
From: "Webmaster" <webmaster@fccj.cc.fl.us>
Subject: Re: chomp ($&) to remove specific \n
Message-Id: <34ac6b9b.0@usenet.fccj.cc.fl.us>
I would really get length of substring and rindex the beginning/end, as the
case may be :-)
But, chomp will ONLY chomp off the last \n
So, if there are more than x number of '\n' you'll probably want to
$returnstring = s/matchpattern.*\n/$_/\/egi
Something like that? MY RegEx is not all that great :-)
HTH,
Bill
Joseph N. Hall wrote in message <34A8A7CA.5C29C17C@5sigma.com>...
>Geez, and I thought chomp returned the character chomp-ed.
>
>$& is read-only. You canna chomp 'er, cap'n, she'll fly apart!
>
> -joseph
>
>Joe Marler wrote:
>>
>> I'm using Perl 5.001 on Win32. I need to strip out selected \n
>> characters from a text file using inplace editing, where the \n is
>> preceded by a specific match pattern.
>>
>> I tried this:
>>
>> s/matchpattern.*\n/chomp($&)/egi
>>
>> However chomp() returns the no. of characters removed, not
>> the string minus \n, so that won't work. I tried chop(), but
>> got an error saying "modification of a read-only value attempted".
------------------------------
Date: Fri, 02 Jan 1998 01:39:32 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: Finding the TITLE to a HTML page
Message-Id: <34ACA78F.5DD31060@5sigma.com>
If I say, "You can be more productive, or more correct," a
large group of people will see exactly what I mean, and another
large group of people will see exactly what I mean, and they
will be in complete disagreement. There is nowhere further
to go with this.
-joseph
Tushar Samant wrote:
> In other words, I'm being just as practical and reasonable as
> you are. But we are somehow reaching opposite conclusions.
------------------------------
Date: Fri, 02 Jan 1998 01:25:16 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: htmlcolorizer4U
Message-Id: <comdog-ya02408000R0201980125160001@news.panix.com>
Keywords: from just another new york perl hacker
In article <68hifj$746$2@brokaw.wa.com>, Thanh Luu <jeffrey@halcyon.com> wrote:
>So cool just had to share it.
thanks. what is it?
--
brian d foy <comdog@computerdog.com>
Institute For the Organically-Challenged
<URL:http://computerdog.com/brian/Institute.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 01 Jan 1998 22:45:42 -0800
From: ~arthur <star@sonic.net>
Subject: i am a newbie
Message-Id: <34AC8D15.3AD4@sonic.net>
Hi,
Could anyone explain how to make an html doc (a page on www) work with a
simple program i made with perl:
#!/usr/bin/perl -w
print "Hi!,what is your name?";
$name = <stdin>;
chomp $name;
if ($name eq "lisa"){
print "hello lisa i love you\n";
} else {
print "hello, $name!\n";
}
Thanks 4 the help,
~arthur
star@sonic.net
------------------------------
Date: Fri, 02 Jan 1998 01:57:03 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: i am a newbie
Message-Id: <comdog-ya02408000R0201980157030001@news.panix.com>
Keywords: from just another new york perl hacker
In article <34AC8D15.3AD4@sonic.net>, star@sonic.net wrote:
>Could anyone explain how to make an html doc (a page on www) work with a
>simple program i made with perl:
>#!/usr/bin/perl -w
use CGI;
$input = new CGI;
$name = $input->param('name');
#>print "Hi!,what is your name?";
#>$name = <stdin>;
#>chomp $name;
print "Content-type: text/plain\n\n"
>if ($name eq "lisa"){
>print "hello lisa i love you\n";
>} else {
>print "hello, $name!\n";
>}
it's that easy. good luck :)
--
brian d foy <comdog@computerdog.com>
Institute For the Organically-Challenged
<URL:http://computerdog.com/brian/Institute.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 1 Jan 1998 23:08:32 -0500
From: "Webmaster" <webmaster@fccj.cc.fl.us>
Subject: Re: LWP SSL POST requests
Message-Id: <34ac6905.0@usenet.fccj.cc.fl.us>
HTTP(S) POST looks just like a GET, but it does not show up on the URL. You
may want to look at Lincoln Steins 'CGI.pm' (which is now included with Perl
5.004 anyways :-)
www-url-encoded would be another place to peek at your possible problem(s)
:-)
HTH,
Bill
Chris Schoenfeld wrote in message <34A91782.1F14@ixlabs.com>...
>I recently got all the LWP/SSLeay/SSLeay-Perl stuff working, so I can
>now create a secure SSL socket.
>
>Now I need to hand-code a couple of POST requests with a few simple
>key-value pairs.
>
>I have not, however, been able to find good documentation about what a
>HTTPS POST request looks like (or HTTP POST requests for that matter).
>
>More than reference, I need examples.
>
>If someone could email me a sample HTTPS POST request, or knows a way I
>could watch my outgoing requests from a browser (well, they would be
>encrypted, that wouldn't work), I would be immensely grateful.
>
>Thanks
>Chris
------------------------------
Date: Thu, 1 Jan 1998 23:13:20 -0500
From: "Webmaster" <webmaster@fccj.cc.fl.us>
Subject: Re: LWP SSL POST requests
Message-Id: <34ac6a25.0@usenet.fccj.cc.fl.us>
PSS - Sorry, forgot to also say that SSL requests appear, normally, on port
443 - unless you've changed that spec :-)
Bill
Webmaster wrote in message <34ac6905.0@usenet.fccj.cc.fl.us>...
>HTTP(S) POST looks just like a GET, but it does not show up on the URL.
You
>may want to look at Lincoln Steins 'CGI.pm' (which is now included with
Perl
>5.004 anyways :-)
>
>www-url-encoded would be another place to peek at your possible problem(s)
>:-)
>
>HTH,
>Bill
>
>
>
>Chris Schoenfeld wrote in message <34A91782.1F14@ixlabs.com>...
>>I recently got all the LWP/SSLeay/SSLeay-Perl stuff working, so I can
>>now create a secure SSL socket.
>>
>>Now I need to hand-code a couple of POST requests with a few simple
>>key-value pairs.
>>
>>I have not, however, been able to find good documentation about what a
>>HTTPS POST request looks like (or HTTP POST requests for that matter).
>>
>>More than reference, I need examples.
>>
>>If someone could email me a sample HTTPS POST request, or knows a way I
>>could watch my outgoing requests from a browser (well, they would be
>>encrypted, that wouldn't work), I would be immensely grateful.
>>
>>Thanks
>>Chris
>
>
------------------------------
Date: 2 Jan 1998 06:19:22 GMT
From: Dave Neuer <smoothie@spiritone.com>
Subject: need help with pattern match
Message-Id: <34AC89E9.66D0A61A@spiritone.com>
I've written a Perl script which takes user input from a form and
formats the content then adds it to an existing web page. I am trying
to modify it so that it checks to see if the email address and homepage
URL the user entered appear to be valid so that I don't end up with
broken links on my page. The email portion works great, but so far the
URL portion doesn't work at all.
Here is the code:
#test to see if the "email" field was blank or doesn't appear to be
#a valid email address, set $name_address accordingly
if ($email =~ m/.+@.+\..{2,3}/) {
$name_address = '<a href="mailto:' . $email . '">' . $name . '</a>';
} else { $name_address = $name; }
#test to see if $page appears to be a valid URL,
#set $page_link accordingly DOESN'T WORK YET
if ($page !~ m!^[(http://.+) | (www.*)]\..+\..{2,3}\/.+!) {
$page_link = "unknown";
} elsif ($page !~ m{^http://.+}) {
$page_link = '<a href="http//' . $page . "\">$page</a>";
} else { $page_link = '<a href="' . $page . "\">$page</a>"; }
Can anyone tell me why this doesn't work? I'm relatively new to Perl.
The debugger says that the syntax is ok, yet somehow no matter what I
enter for a URL in the form, the resulting value in $page_link is always
the string "unknown".
Any help would be appreciated.
Thanks,
Dave Neuer
------------------------------
Date: Fri, 02 Jan 1998 01:47:15 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: need help with pattern match
Message-Id: <comdog-ya02408000R0201980147150001@news.panix.com>
Keywords: from just another new york perl hacker
In article <34AC89E9.66D0A61A@spiritone.com>, smoothie@spiritone.com wrote:
>#test to see if the "email" field was blank or doesn't appear to be
>#a valid email address, set $name_address accordingly
>
>if ($email =~ m/.+@.+\..{2,3}/) {
$email = q|#@k.tt !@#$%^&*@|;
print 'match' if $email =~ m/.+@.+\..{2,3}/;
hmmm.... email validation is a generally wasteful pursuit.
> $name_address = '<a href="mailto:' . $email . '">' . $name . '</a>';
>} else { $name_address = $name; }
>
>#test to see if $page appears to be a valid URL,
>#set $page_link accordingly DOESN'T WORK YET
testing for a vaild url (how about using URI::URL?) is not the same
thing as testing for a URL that actually leads to something other
than a 404 error. see the LWP module for an almost trivial way
to validate an address.
good luck :)
--
brian d foy <comdog@computerdog.com>
Institute For the Organically-Challenged
<URL:http://computerdog.com/brian/Institute.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Fri, 02 Jan 1998 01:21:10 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Need script to preview form data prior to submitting
Message-Id: <comdog-ya02408000R0201980121100001@news.panix.com>
Keywords: from just another new york perl hacker
In article <mbudash-0101981739410001@d67.pm9.sonic.net>, mbudash@sonic.net (Michael Budash) wrote:
>
>part 1
>------
>parse input (if any). use CGI.pm or <god forbid> cgi-lib.pl
>
>part 2 (optional)
>------
>validate input if "confirm" or "ok" have been passed in, noting any
>errors. (more on these two values later)
this part is a really bad idea. the user can change the data
in the HTML file and submit anything he likes in the field. i don't
like to give the user that much flexibility. i suggest a string of
CGI scripts:
form generator -> HTML FORM -> form checker script ->
PREVIEW PAGE -> process/email script
each step must go on to the next. i usually integrate some sort
of checksum (generated by the form checker and checked by the
final script) to see if the data were mucked with between them.
it's still possible to muck with the data, but most people won't
go through the trouble to figure out the checksum stuff, and those
that do are going to find a way to play with your scripts
regardless.
this technique has the great advantage of letting one work on
peices of the system without messing up everything with a single
syntax error. use of a consistent naming scheme for such a string
of scripts, such as
guestbook_form_maker.cgi
guestbook_form_checker.cgi
guestbook_form_processer.cgi
makes them easy to manage, especially if you have several applications
that use this technique. everyone in your <buzzword>enterprise</buzzword>
knows which script does what function in the grand scheme of things.
>part 3
>------
>if "confirm" passed in and there were no validation errors, process the
>form data and exit the program
>
--
brian d foy <comdog@computerdog.com>
Institute For the Organically-Challenged
<URL:http://computerdog.com/brian/Institute.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 2 Jan 1998 08:40:49 GMT
From: Eli the Bearded <*@qz.to>
Subject: perl is c worsened (was: Re: word wrap routine)
Message-Id: <qz$9801020242@qz.little-neck.ny.us>
Keywords: "worsened" is used in jest
Michael Budash <mbudash@sonic.net> wrote:
> In article <34AB06EE.5336@erols.com>, jcotton@erols.com wrote:
> >> Opinion #2. Perl is a language which took all the bad parts of C and
> >> made them even worse.
> Thim's fightin' wurds, pardnur!!
It's true, for certain values of "worse". It can be hard to say what a
particular c compiler will do with some absurd bit of code, the 'k+++i'
(just above the "puts" on the last line) in this is a good example:
/* gcc signature.c -lm */
main(i,j,k,l){for(i=-12;i<13;i++,printf("\e[H")){for(l=141596885
;l>8;l>>=4)p(97-(l>>22)+(l&15));for(j=-12;j<12;){for(k=j+12?-12:
-6;12>k;)p((l=k*k+++i*i+j*j)<144?(l=sqrt(l))[".,:;iIJYVSOM"]:32)
;j++<11?p(10):0;}}puts("Elijah: #@qz.to");}p(m){printf("%c",m);}
Similarly, "l=sqrt(l)" is a rather strange way to get an integer
answer for the square root of an integer.
The beauty of it lies in the computational density of the language.
That little bit of code produces an entire ascii art movie -- the
intended effect being planar cross-sections of a shaded sphere,
the actual effect looking more like a bomb, notwithstanding. Few
other languages can rival the terseness of that code for that task:
it is 256 bytes, plus the compiling comment and newlines.
This is not an example of readible code, no. But Pascal's or Modula-3's
or whatever's lack of dominance in any programming except school
work points to an evolutionary disadvantage against verbose languages.
Crystals that have very well defined and simple structure ("superior
cleavage" to flesh-eating-faggot-hacker-vultures) are weak, while
complicated ones often have considerable strength.
Perl has many similar features to C, but also a syntax that is at
once denser and more obfuscatory. There is parsing behavior in perl
that very few people will ever master. Offhand, I suspect Randal
himself might not know gut-feeling the output of this simple sequence:
#!/usr/bin/perl -w
$_ = qq ' fun \n' ;
s #\w+# NY PM # && s
/ \w+ / just some new york perl hackers /xg ;
print ;
__END__
On the plus side, I can with a single s/// replace many lines of C
code frequently. And perl's malleable idea of what type a variable
represents is very handy most of the time. This is just like C, only
worse. :^)
Elijah
------
hopes he has broken Ilya's emacs syntax highlighting of s/// again
------------------------------
Date: Fri, 02 Jan 1998 01:04:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl not Y2K compliant
Message-Id: <comdog-ya02408000R0201980104220001@news.panix.com>
Keywords: from just another new york perl hacker
In article <mbudash-0101981722380001@d67.pm9.sonic.net>, mbudash@sonic.net (Michael Budash) wrote:
>in perlfaq.html#Does_Perl_have_a_year_20_probl i see:
>
> The date and time functions supplied with perl (gmtime and localtime)
> supply adequate information to determine the year well beyond
> 2000 (2038 is when trouble strikes).
>
>can someone explain why 2038 is such a magic number?
that's when unix runs out of seconds since the Epoch in it's current
time structure. however, things will be fixed by then and (hopefully)
everything be be transparent to the user.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
always thought it should be "opaque".
------------------------------
Date: 2 Jan 1998 06:50:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl not Y2K compliant
Message-Id: <slrn6ap3l0.50c.abigail@betelgeuse.wayne.fnx.com>
brian d foy (comdog@computerdog.com) wrote on 1585 September 1993 in
<URL: news:comdog-ya02408000R0201980104220001@news.panix.com>:
++ In article <mbudash-0101981722380001@d67.pm9.sonic.net>, mbudash@sonic.net (Michael Budash) wrote:
++
++ >in perlfaq.html#Does_Perl_have_a_year_20_probl i see:
++ >
++ > The date and time functions supplied with perl (gmtime and localtime)
++ > supply adequate information to determine the year well beyond
++ > 2000 (2038 is when trouble strikes).
++ >
++ >can someone explain why 2038 is such a magic number?
++
++ that's when unix runs out of seconds since the Epoch in it's current
++ time structure. however, things will be fixed by then and (hopefully)
++ everything be be transparent to the user.
Huh, what do you mean "by then"? People said so in the 70's about
Y2K too, and look what happened. Besides, if you have to work with
dates 40 years in the future, you might feel the results in a few
weeks. :)
Oh well, perhaps you mean only a few geeks will still use Unix by
then, and the rest has moved to Windows.
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: Fri, 02 Jan 1998 02:26:50 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl not Y2K compliant
Message-Id: <comdog-ya02408000R0201980226500001@news.panix.com>
Keywords: from just another new york perl hacker
In article <slrn6ap3l0.50c.abigail@betelgeuse.wayne.fnx.com>, abigail@fnx.com wrote:
>brian d foy (comdog@computerdog.com) wrote on 1585 September 1993 in
><URL: news:comdog-ya02408000R0201980104220001@news.panix.com>:
>++ In article <mbudash-0101981722380001@d67.pm9.sonic.net>, mbudash@sonic.net (Michael Budash) wrote:
>++
>++ >in perlfaq.html#Does_Perl_have_a_year_20_probl i see:
>++ >
>++ > The date and time functions supplied with perl (gmtime and localtime)
>++ > supply adequate information to determine the year well beyond
>++ > 2000 (2038 is when trouble strikes).
>++ >
>++ >can someone explain why 2038 is such a magic number?
>++
>++ that's when unix runs out of seconds since the Epoch in it's current
>++ time structure. however, things will be fixed by then and (hopefully)
>++ everything be be transparent to the user.
>
>
>Huh, what do you mean "by then"?
"by then" i was thinking only of the effects on the Unix clock. one
could always make another structure for their own times :)
--
brian d foy <comdog@computerdog.com>
------------------------------
Date: Fri, 02 Jan 1998 01:06:47 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: PERL programmer needed.
Message-Id: <comdog-ya02408000R0201980106470001@news.panix.com>
Keywords: from just another new york perl hacker
In article <883714026.45875202@dejanews.com>, Marcus A. Davis <marcus@alex.net> wrote:
>The Alexander Group, Inc. provides custom Internet Applications and is
>seeking qualified PERL programmers. Full and part-time positions are
>available. Please contact Marcus A. Davis at 888.253.9637 or send email
>with resume.
what's "qualified" and where in the world are you?
--
brian d foy <comdog@computerdog.com>
Institute For the Organically-Challenged
<URL:http://computerdog.com/brian/Institute.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Fri, 02 Jan 1998 02:12:28 -0500
From: Eddie Brown <eddie@NOSPAMMING.cs.odu.edu>
Subject: Perl Trick?
Message-Id: <34AC935B.E2E575CD@NOSPAMMING.cs.odu.edu>
Besides having a java program execute a perl prog: does anyone know
of a way of having a perl program execute as soon as a page is accessed?
Any help is much appreciated.
Thanks,
Eddie
------------------------------
Date: Thu, 1 Jan 1998 23:04:30 -0500
From: "Webmaster" <webmaster@fccj.cc.fl.us>
Subject: Re: Perl5 on NT4 with IIS4
Message-Id: <34ac6815.0@usenet.fccj.cc.fl.us>
Funny, I got it working after about 30 minutes or so :-)
Only problem was one relating to IE4.x which Microsoft is hopefully gonna
fix soon (maybe not) and the fact that a lot of the Unix-related code does
not work under Win-Perl5 version; but with some planning you should be able
to achieve cross-platform compatibility...
See ActiveState (previously ActiveWare) site at http://www.activestate.com/
Release Build 315 (Perl5) and some new stuff is out now,
HTH,
Bill
scott@softbase.com wrote in message <68dtmd$m96$3@mainsrv.main.nc.us>...
>Mario Abela (mario.v.abela@magnet.mt) wrote:
>
>> Can anyone help me setting up Perl5 to run under IIS4 on NT or from where
I
>> can get the info to set it up?
>
>I tried on and off for about six months to get Perl scripts
>to work on an NT server, and gave up and put an Apache
>server on a UNIX box just to handle CGI.
>
>Scott
>--
>Look at Softbase Systems' client/server tools, www.softbase.com
>Check out the Essential 97 package for Windows 95 www.skwc.com/essent
>All my other cool web pages are available from that site too!
>My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Fri, 02 Jan 1998 00:58:22 -0800
From: Denard Springle <admin@vsgcom.com>
To: scribble@pobox.com
Subject: Re: Simple(!) regular expression problem
Message-Id: <34ACAC2E.865@vsgcom.com>
Tushar Samant wrote:
>
> joseph@5sigma.com writes:
> >Others may offer conjecture, but I for one have absolutely no
> >idea what you are hoping to do. Can you tell us what "make the
> >following two variables match" means?
>
> My guess is that the problem REALLY is about deciding whether the
> two strings are equivalent somehow. So probably what's wanted is
> some canonical form of both strings so they could be compared.
>
> Maybe the canonical form is "first string of non-whitespace". In
> any case, if I am right, then both $reqinput and $reqmatch need
> to be modifed before the test is made.
>
> >Laurel Shimer wrote:
> >>
> >> I am very embarassed that I just don't get how to do regular expressions
> >> yet... Have been staring at the Camel, the Llama book and the Perl Reference
> >> Guidetrying to figure out how to make the following two variables match
> >>
> >> $reqinput ="360-WG-002 ";
> >> $reqmatch =" 360-WG-002";
Laurel,
Perhaps try the /g option such as:
if ($reqmatch =- /360-WG-002/g) && ($reqinput =- /360-WG-002/g){
or the /x option such as:
if ($reqmatch =- /360-WG-002/x) && ($reqinput =- /360-WG-002/x){
or, use a third variable if you need to assure a match on any kind of
text such as:
$match = "360-WG-002";
if ($reqmatch =- /$match/g) && ($reqinput =- /$match/g) {
for example? Is this what you are looking for??
Sincerely,
Denard Springle
------------------------------
Date: Fri, 02 Jan 1998 03:41:14 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Why this QUERY_STRING is empty?
Message-Id: <comdog-ya02408000R0201980341140001@news.panix.com>
Keywords: from just another new york perl hacker
In article <34a6f0db.3381806@mikasa.iol.it>, sbc@iol.it (Bud Bundy) posted:
>I have a script being called by a hyperlink like this:
>http://host.com/cgi-bin/c.pl?26
>So I'd expect to be able to detect the value with a line like this:
>QUERY_STRING == 26
According to the CGI specification, the query string is passed as
part of the environment. to access this with Perl, you would
look in $ENV{'QUERY_STRING'}. i beleive CGI.pm also has some
methods to deal with this... yep, there are two methods that
would work here:
$input = new CGI;
@data = $input->keywords;
$data = $input->query_string;
hope that helps :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 2 Jan 1998 06:00:53 GMT
From: plambert$1@plambert.org
Subject: Writing a "nice" server?
Message-Id: <68hvql$spf$1@nntp1.ba.best.com>
I'm writing a Socket-based server which isn't behaving in the manner I
expect. I have read as much documentation as I can find, but am still
confused by the behavior I am seeing.
Specifically, my program is _not_ forking when it receives a connection.
I'm using the method described in Advanced Perl using select().
Now, Advanced Perl suggests (unless I'm misreading it), that a call to
select(), until it returns, will be quiescent... i.e. well-behaved.
Is this true? Because if it is, I'm doing something wrong. My server,
with no clients even connected, sits in the select() call, but uses
all the cpu it can get. I've tried 'truss' on a Solaris machine, and it
shows me a lot of calls to something with 'poll' in the name, which
suggests that select() isn't quiescent.
If it isn't, can anyone suggest a way to make a server be "nice" without
forking? The server allows communication between clients, and so I
need to stay within a single process. (I could try to use vfork but that
is beyond me, and too much work--I'll just shoot myself in the foot... ;-)
If it is supposed to be quiescent, I'm doing something wrong, so I'll
post a pared-down version of my code. It's safe to assume there are
many people here who will spot my errors rather quickly.
Many thanks to anyone who has read this far; I really appreciate your
help.
--Paul Lambert
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 1566
**************************************