[7290] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 915 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 24 20:08:02 1997

Date: Sun, 24 Aug 97 17:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 24 Aug 1997     Volume: 8 Number: 915

Today's topics:
     "dlopen: stub interception failed" when using DBM. (Lennart Regebro)
     Does tie hash require an flock? <steffi@shell8.ba.best.com>
     Re: easiier way to extract one field from a string (Greg Bacon)
     Re: efficient editing <tom@mitra.phys.uit.no>
     Re: efficient editing (Brandon S. Allbery KF8NH)
     Re: Error creating files <mf@fishbone.ruhr.de>
     Re: Help me !!! :) <petri.backstrom@icl.fi>
     Re: Help on Final Exam (Perl class) (Adam Rogoyski)
     Re: Help With Loading of Perl Modules <mf@fishbone.ruhr.de>
     Re: Help: Compiling Perl <petri.backstrom@icl.fi>
     Re: Help: Making CGI using Perl (Adam Rogoyski)
     Re: How can I make this CGI script work <joan@rhein-neckar.netsurf.de>
     Re: How do I find the system date/time? <petri.backstrom@icl.fi>
     indexed Search Engine <boblally@gte.net>
     logging source via cgi ??? <thomasdj@wam.umd.edu>
     Need advice on data storage and retrieval <mbosley@shore.net>
     Need help: how to exit a subroutine if a test inside fa (Alex Dong Li)
     Re: Need help: how to exit a subroutine if a test insid (Mike Stok)
     NT problem with ARGV (Steve Leibel)
     Re: Perl & Forms <petri.backstrom@icl.fi>
     Re: PERL 5.001 on WIN NT 4.0 with IIS 3.0 <petri.backstrom@icl.fi>
     Re: PERL 5.001 on WIN NT 4.0 with IIS 3.0 <petri.backstrom@icl.fi>
     Re: PERL and output of Java Applications <petri.backstrom@icl.fi>
     Re:URL for Win32 Perl? (Bill Hey)
     Re: server name <petri.backstrom@icl.fi>
     Re: server name <mf@fishbone.ruhr.de>
     Trivial(?) readdir question (Kirk L. Israel)
     URL for Win32 Perl? (Bill Hey)
     We Need Help!!! <marcus@alex.net>
     Why doesn't flocking a tied hash work? <steffi@shell8.ba.best.com>
     Win95 from a very definite newbie... help please <catflap@geocities.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 24 Aug 1997 23:01:39 GMT
From: lennart.regebro@stockholm.mail.telia.com (Lennart Regebro)
Subject: "dlopen: stub interception failed" when using DBM.
Message-Id: <3400b936.2577932@news.kth.se>

I have a script that does dbmopen. This causes the error:
  dlopen: stub interception failed
  Abort (core dumped)

Not so bueno, eh? With "Perl -de 42" I discovered that just typing 'use
NDBM_File' or 'use ODBM_File' also gives the same results.

I am WAY in over my head by now, and haven't got the slightest clue what to
do. I've searched all the FAQs, but can find nothing.

HELP!!!!!!
-- 
Lennart Regebro         regebro@stacken.kth.se
Homepage                http://www.stacken.kth.se/~regebro/


------------------------------

Date: 24 Aug 1997 11:25:56 -0700
From: Robert Nicholson <steffi@shell8.ba.best.com>
Subject: Does tie hash require an flock?
Message-Id: <yl3hgcfqvyj.fsf@shell8.ba.best.com>

Is there an implicit flock at the time of an unbind?

When does a tied hash sync with the disk? Only at time of unbind?



------------------------------

Date: 24 Aug 1997 16:01:59 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
To: Marvin Blackburn <mlb@netpath.net>
Subject: Re: easiier way to extract one field from a string
Message-Id: <5tpltn$n6r$3@info.uah.edu>

[Posted and mailed]

In article <340081DC.2192@netpath.net>,
	Marvin Blackburn <mlb@netpath.net> writes:
: I am a beginner.  I want to know the easiest way to extract just 
: one field from a white space delimited sting.  Preferablly something
: analogous to *cut*.  I can get the single field using a long regular
: expression match along with the $ operation; however, this gets quite 
: long when the number of fields is high.  The other way using split
: requires alot of needless variable assigments.  

No it doesn't.  Get the fifth and fourteenth fields of a whitespace
separated record with

    ($fifth, $fourteenth) = (split)[4,13];

Read the perlfunc(1) entry on split for more details.

: for example, if wanted to get the 12 field from a 27 field string.
: the fields are white space delimited, and can be described using
: reqular expressions.

If you can describe them with a regular expressions, why didn't you
just incant

    (undef, $second, undef, $fourth) = /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/;

(Substitute your own regular expression above, of course.) A cool trick
demonstrated above is assigning to undef, which simply throws the value
away.

Hope this helps,
Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


------------------------------

Date: 24 Aug 1997 18:12:45 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: efficient editing
Message-Id: <nqou3gfy2yq.fsf@mitra.phys.uit.no>

"Andrew McNaughton" <andrew@squiz.co.nz> writes:

> s/([\\|&])/subst{$1}/g;

s/([\\|&])/$subst{$1}/g;
           ^

> Andrew McNaughton         |       I tried to make it idiot proof,

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


------------------------------

Date: 24 Aug 1997 18:06:20 GMT
From: bsa@void.apk.net (Brandon S. Allbery KF8NH)
Subject: Re: efficient editing
Message-Id: <slrn600tsm.9k.bsa@rushlight.kf8nh.apk.net>

On 24 Aug 1997 12:29:28 GMT, M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
+-----
| That doesn't do anything resembling what was requested.   I suggest you
| test your regexps before posting, as I sometimes do  :-)
+--->8

No, just make sure I'm awake before I post.  (Yesterday was "fun"... about
the way beating one's head against a brick wall is.  I *think* I'm awake
today....)

-- 
brandon s. allbery              [Team OS/2][Linux]          bsa@void.apk.net
cleveland, ohio              mr/2 ice's "rfc guru" :-)           FORZA CREW!
Warpstock '97:  OS/2 for the rest of us!  http://www.warpstock.org
(APK spam kill&log system now in use:  change "void" to "kf8nh" to mail me.)


------------------------------

Date: 25 Aug 1997 00:37:53 +0200
From: Martin Fischer <mf@fishbone.ruhr.de>
Subject: Re: Error creating files
Message-Id: <5tqd41$c21$1@fishbone.ruhr.de>

Arthur Merar <amerar@unsu.com> wrote:
>I have a script that is supposed to create some files during it's
>process.  When I run the script from the shell, everything works fine. 
>but when I invoke it from the browser, it dies trying to create the
>file??

>What do the rights need to be on the directory?  Right now I have them
>set at 755......What else could it be besides the rights?  I mean, it I
>open the file for output and it does not exist, then perl should create
>it, right?
You set it to 755, that means the owner can read, write and execute,
group and world can only read and execute. If you execute the script
from the shell, it is running under your id, when you invoke it from
a browser as CGI-script it runs under the id of your www server. So
chmod the dir to 777 and it should work.

ciao
Martin
-- 
Martin Fischer <mf@fishbone.ruhr.de>                    -------------------
               <Martin.Fischer@fh-bochum.de>           | Comp Sci Student
PGP key available at: http://localhost.ruhr.de/~martin | FH-Bochum, Germany
Unsolicited commercial e-mail will be proof-read for $199/hr.


------------------------------

Date: Sun, 24 Aug 1997 22:29:18 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: Help me !!! :)
Message-Id: <34008B8E.A81@icl.fi>

Fabio Albanese wrote:
> 
> Hello
> 
> I'm looking for a complete guide about PERL language...
> 
> Is there something in WWW ?
> 
> Please reply me in email: falbanese@usa.net
> 
> Thanx
> 
> Fabio

See

   http://www.perl.com/FAQ/

for the docs & more.

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: 24 Aug 1997 19:18:19 GMT
From: ifqa242@spice.cc.utexas.edu (Adam Rogoyski)
Subject: Re: Help on Final Exam (Perl class)
Message-Id: <5tq1dr$pc0$1@geraldo.cc.utexas.edu>

Mike Elliott (mre@emerald.compata.com) wrote:
: I'm going to be teaching a ten-week Programming in Perl class next
: year, and I'd like to make the Final Exam a Perl project.  As this is
: University Extension, I can't expect more than perhaps 30 to 40 total
: hours (per student) expended on it spread out over the quarter. 

: What I'm looking for are suggestions as to what the problem should be.
: Besides the time constraint mentioned above, it should be something
: which is relatively platform independent -- that is, I think I have to
: accommodate bone-heads who insist on using Microsoft operating
: systems.

  Port the tcsh shell to perl.
--
           __/\__.           [-Temperance-]              .__)\__
      !    \ oO /         . :[Adam Rogoyski]: .           \ oO /    !
      .    /_\/_\       .  :[ apoc@laker.net ]:  .        /_\/_\    . 
             \/    .  :[ http://www.laker.net/apoc ]:  .    \/


------------------------------

Date: 25 Aug 1997 00:30:41 +0200
From: Martin Fischer <mf@fishbone.ruhr.de>
Subject: Re: Help With Loading of Perl Modules
Message-Id: <5tqcmh$c1f$1@fishbone.ruhr.de>

Mark Horan <horan@inetarena.com> wrote:
>Hi,
>   I've installed the lastest version of Perl on our Linux system.
>But I haven't, I don't think, succeeded in installing it with dynamic
>loading
>enabled. I frankly don't know how terribly important this is. But 
>now I need to get the Msql module installed and working. I believe

>So my question is in two parts. 1) Is it essential to have dynamic loading
>enabled, and 2) How to I build a new Perl executable with the Msql module
>statically linked to it?
It's better to compile perl with dynamic loading, maybe you wish to
install another module next week, or do you want to compile perl
again and again?
Why do you want the msql module statically linked? Besides, I don't
know how to do it.

ciao
Martin
-- 
Martin Fischer <mf@fishbone.ruhr.de>                    -------------------
               <Martin.Fischer@fh-bochum.de>           | Comp Sci Student
PGP key available at: http://localhost.ruhr.de/~martin | FH-Bochum, Germany
Unsolicited commercial e-mail will be proof-read for $199/hr.


------------------------------

Date: Sun, 24 Aug 1997 23:49:11 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: Help: Compiling Perl
Message-Id: <34009E47.3D5F@icl.fi>

Arthur Merar wrote:
> 
> Is there a way to compile a perl program in order to check the syntax???

Do you mean like what the -c switch (as documented
in the Perl documentation in perlrun) does?

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: 24 Aug 1997 19:23:55 GMT
From: ifqa242@spice.cc.utexas.edu (Adam Rogoyski)
Subject: Re: Help: Making CGI using Perl
Message-Id: <5tq1ob$pc0$2@geraldo.cc.utexas.edu>

stormshield@hotmail.com wrote:
: (1) Showing visitor's IP Address.
   This isn't too hard.

#!/usr/local/bin/perl -w
$| = 1;
print "Content-type: text/html\r\n\r\n";
print "<HTML><BODY>\n";
print "<BR>Your Ip Address: $ENV{REMOTE_ADDR}";
print "<BR>You Host info  : $ENV{REMOTE_HOST}";
print "</BODY></HTML>";

You will need to change the first line to point to the location where perl
is acutally located, /usr/local/bin/perl or /usr/bin/perl are very common
places.  "which perl" or "whereis perl" might be availible to tell you
this information as well.
--
           __/\__.           [-Temperance-]              .__)\__
      !    \ oO /         . :[Adam Rogoyski]: .           \ oO /    !
      .    /_\/_\       .  :[ apoc@laker.net ]:  .        /_\/_\    . 
             \/    .  :[ http://www.laker.net/apoc ]:  .    \/


------------------------------

Date: Sat, 23 Aug 1997 14:27:33 -0400
From: Joachim Nock <joan@rhein-neckar.netsurf.de>
Subject: Re: How can I make this CGI script work
Message-Id: <33FF2B95.5141@rhein-neckar.netsurf.de>

I. John Misiris wrote:

> first.pl
> ----------------------------
> #!/perl5/perl5
> use CGI ':standard";
          ^
Looks like a typo...

> print h1("Just a test.").
                          ^
Another one...

> After clicking the link i get the error:
> ----------------------------
> 404 Not found
> The requested URL/ was not found on this server.
> ----------------------------

Afaik you can't use *.pl files with os2httpd (Correct me if i'm wrong,
at least i can't...).
Rename the *.pl file to *.cmd and place extproc perl -S at the first
line. Change your HTML Code to call cgi-bin/first.cmd

-- cut --
extproc perl -S
#!/usr/local/bin/perl
#
# standard perl script goes here...
#
-- cut --

The script returns <H1>Just a test.</H1> when started manually. Without
a proper MIME type the server won't accept this as valid html code. You
should at least add one additional line to your script:

first.cmd
----------------------------
extproc perl -S
#!/perl5/perl5
use CGI ":standard";

print "Content-type: text/html\n\n";
print h1("Just a test.");
   
---------------------------

This script works with my os2hhtpd. I didn't bother with the CGI module
yet - perhaps there's a call for creating the mime type also.

-- Joachim




------------------------------

Date: Sun, 24 Aug 1997 23:54:35 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: How do I find the system date/time?
Message-Id: <34009F8B.2653@icl.fi>

Kelly Baxter wrote:
> 
> I tried this and it didn't work...  I'm in NT though... is this a unix
> variable? (localtime that is)
> 
> Tom Phoenix <rootbeer@teleport.com> wrote in article
> <Pine.GSO.3.96.970818063935.25618C-100000@julie.teleport.com>...
> > On Sun, 17 Aug 1997, David Anderson wrote:
> >
> > > Subject: How do I find the system date/time?
> >
> >     $date = localtime;                # Get the date and time

It works fine on my Windows NT system (I added the
print to show that it does ;-)

   C:\>perl -e "$date=localtime; print $date;"
   Sun Aug 24 23:52:53 1997
   C:\>

Perhaps you should post the code you tried, and what
you tried to do with it, and also show us what happened?

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: 24 Aug 1997 22:09:51 GMT
From: "Bob lally" <boblally@gte.net>
Subject: indexed Search Engine
Message-Id: <5tqbff$jlk$1@gte1.gte.net>

Was wondering if anyone knows of a good perl based indexed search engine?
I've searched the net and not found a thing.

Thanks.

Bob





------------------------------

Date: Sun, 24 Aug 1997 18:23:17 -0400
From: "David J. Thomas" <thomasdj@wam.umd.edu>
Subject: logging source via cgi ???
Message-Id: <3400B455.78CE@wam.umd.edu>

I need to simply log the url of each page to a logfile at my internal
web.
So when a page is hit... it automatically appends a log file with the
name of that url.
I almost have it... 
I am using a hidden form, with javascript, and calling a cgi-script to
do this.
Only problem is... the cgi-script has to return a page. I don't want to
return anything.
I simply want to append a log.  I have the following code done.

Thanks for the help...

############################################
HTML PAGE
############################################

<html>
<FORM NAME="frm"
ACTION="http://cgi-bin.something.com/username/cgi-bin/form8.cgi"
METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="data1" VALUE="">
</FORM>

<SCRIPT LANGUAGE="javascript"><!--

document.frm.data1.value = window.document.location;

document.frm.submit()

//--></SCRIPT>

The html page goes here....

</html>

############################################
CGI-SCRIPT
############################################

#!/usr/bin/perl
 
  read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  @pairs = split(/&/, $buffer);

  foreach $pair (@pairs)
  {
   ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $value =~ s/~!/ ~!/g;
    $FORM{$name} = $value;
   }

   open(OUTF,">>data.txt");
   print OUTF "$FORM{'data1'}\n";
   close(OUTF);

#  I really don't want the following line... but... I don't think I have
a choice unless
#  I use SSI... Is there any other way?
   print "Location:http://www.something.com/cgi-bin/data.txt\n\n";


------------------------------

Date: Sun, 24 Aug 1997 14:03:05 +0100
From: random <mbosley@shore.net>
Subject: Need advice on data storage and retrieval
Message-Id: <34003109.5443675C@shore.net>

Hi all,

First, let me say thanks to this group for all of the help you all have
provided over the past 2 years I have been using Perl.

Where else but the net can you read a book by someone and have that same
person respond to one of your posts?

Ok, here's the question.  I am writing a web based game and the back end
is in perl.  Up until now, I have been using basic delimited text files
to store and retrieve the data.  I have found that most of the
programming I am doing is retrieving/storing the data to those files. 
It would be wonderous if I could get some alternatives to using the
delimited text files (faster IS better! :)

A sample entry would look something like this (delimited by ::):

Draegonya::troop::Infantry::0::1800::4.4::11::0.55::22::11::::22::1::112::1::1::900::1.1::0.5::::2::1::::5.5::1::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::0::1::1::250::::::0.666666666666667::A/G::0.166666666666667::0.5::0.166666666666667::::2::1::0::0::0::::::0::N/A::0::0::0::::0::0::0::0::0::::::0::N/A::0::0::0::::0::0::0::0::0::::::0::N/A::0::0::0::::0::0::0::0::0::::::0::N/A::0::0::0::::0::0::0::0::0::::::0::N/A::0::0::0::::0::0::2950::5.5::10.5::19.5::9.83333333333333::::14.5::1::112::::::::737500::1652000::0::0

*But* each database is different.  Each player has 6 separate db's to
hold their info.  Some are 5 entries, and one is 248 entries.

I was recently toying with packing and unpacking the info (which could
actually be quite nice).  Also, I was toying with the idea of using
mSQL.  The problem I can forsee is that the game is written to run on
anything that Perl is ported to (hopefully...) so I will need something
that can be used crossplatform (mainly on Unix variants and WIN32.)

Would packing/unpacking the data be the best route to go?  If so, where
can I find more extensive documentation?  I tried to find info in the
FAQ, the manual, the Learning Perl book, and some Perl Unleashed book,
but most of them only have a page or two of info (some, a line or two).

Thanks again!

random
(Michael Bosley)


------------------------------

Date: Sun, 24 Aug 1997 19:14:35 GMT
From: li@globalserve.net (Alex Dong Li)
Subject: Need help: how to exit a subroutine if a test inside fails?
Message-Id: <5tq13g$d0d$2@titan.globalserve.net>

Hello, everyone,

I am writing a big subroutine. There are some tests in the subroutine.
Could anyone tell me how to exit the subroutine if a test fails?
It seems that function "exit" will terminate the whole program, not just the 
subroutine.

Thanks for help!

Alex Dong Li

Email: ali@genet.sickkids.on.ca    URL: http://www.globalserve.net/~li/


------------------------------

Date: 24 Aug 1997 19:45:52 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Need help: how to exit a subroutine if a test inside fails?
Message-Id: <5tq31g$d7u@news-central.tiac.net>

In article <5tq13g$d0d$2@titan.globalserve.net>,
Alex Dong Li <li@globalserve.net> wrote:
>Hello, everyone,
>
>I am writing a big subroutine. There are some tests in the subroutine.
>Could anyone tell me how to exit the subroutine if a test fails?
>It seems that function "exit" will terminate the whole program, not just the 
>subroutine.

You can use 

  return;

to return from a subroutine.  If you are expecting a value back from the
routine then return bu itself returns an udefined value (in scalar
context) or an empty list in array context.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


------------------------------

Date: Sun, 24 Aug 1997 13:16:32 -0800
From: stevel@coastside.net (Steve Leibel)
Subject: NT problem with ARGV
Message-Id: <stevel-2408971316320001@smx-ca1-24.ix.netcom.com>


I have intermittent problems getting the following simple script to work
properly on NT, both with 5.003_07 and 5.004_02:

    print "@ARGV\n";

When run with arguments supplied, the script still prints an empty string.

On 5.003_07 I solved the problem by re-downloading and re-installing.

On 5.004_02 I can not seem to solve it.

Anybody else experiencing this?

Steve Leibel
stevel@coastside.net


------------------------------

Date: Mon, 25 Aug 1997 00:09:15 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: Perl & Forms
Message-Id: <3400A2FB.38C2@icl.fi>

Arthur Merar wrote:
> 
> I am writing a Perl/CGI program, one of my first.  I have two questions.
> 
> 1)  Can you, and if so how do you, print data to a specific frame on
> your page?  Is this possible?
> 
> 2)  This kind of relates to question 1, but when you output data to the
> screen, must you always re-draw the entire screen?  Can I just, say,
> print the data between lines 10 and 20????

Your questions are not about Perl, but about web authoring/HTML/CGI
in general, and would be better addressed in

   comp.infosystems.www.authoring.cgi
   comp.infosystems.www.authoring.misc
   comp.infosystems.www.authoring.html

The fact that you happen to be attempting to use Perl as your CGI
scripting language makes no difference.

Anyway, you can print to a specific frame, provided whomever called 
your CGI script did so by specifying the target frame name (and when
the data comes back, it is the browser that remembers which frame to
display the stuff in). In the script you cannot do it.

As to your second question: Yes, you must. Try the CGI tutorials
at

   http://www.panix.com/~clay/perl/query.cgi?cgi

for starters.

See also

   http://www.perl.com/FAQ/

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: Mon, 25 Aug 1997 00:15:07 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: PERL 5.001 on WIN NT 4.0 with IIS 3.0
Message-Id: <3400A45B.1D5F@icl.fi>

Janne Blomqvist wrote:
> 
> IMHO, you should seriously consider taking another approach. I read
> in MikroDatorn (A swedish computer mag) that IIS 3.0 has some serious
> problems relating to CGI. It seems that there is no way of stopping
> a runaway CGI process! Since the CGI process runs under IIS, which
> happens to be a system process, you aren't allowed to kill it, even
> if you're root (or whatever superuser is called in NT, administrator
> maybe??). So the only way to stop this runaway CGI process is to
> reboot...

No need to reboot; the kill.exe utility in the
Windows NT Resource Kit will kill a process that
you can't get rid of with Task Manager.

While you're at it, see also tlist.exe.

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: Mon, 25 Aug 1997 00:12:58 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: PERL 5.001 on WIN NT 4.0 with IIS 3.0
Message-Id: <3400A3DA.63BE@icl.fi>

dRAGoNFLy wrote:
> 
> I have serious trouble installing perl on my IIS 3.0 webserver. I want to
> install perl on the Webserver HD (which is easily done with install.bat I
> guess) but after that I create a directory called "cgi-bin" in the wwwroot
> directory, I make it executable with the Internet Service Manager and I map
> it so that http://azul/cgi-bin is the cgi-bin directory. Works fine, but
> then comes the problem, when I put a simple script in the cgi-bin directory
> and a html file in the samples directory, and I press my submit button
> (it's a simple search engine) I arrive at the search.pl script with the
> nice error: HTTP/1.0 501 Not Supported
> I think he doesn't recognize the .pl file and he doesn't associate it with
> the perl.exe interpreter.
> Can somebody please help me out with this because it's rather important.
> BTW I ain't a Windows NT specialist or IIS 3.0 freak either (yet :)

See the Perl for Win32 FAQ (Frequently Asked Questions)
list about how to set up Perl with IIS:

  http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html

Hint: Search for "Script Map" (although, searching for "Internet
Information Server" would also do).

See also:

   http://www.panix.com/~clay/perl/query.cgi?cgi

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: Mon, 25 Aug 1997 00:17:09 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: PERL and output of Java Applications
Message-Id: <3400A4D5.5C72@icl.fi>

Claude Montpetit wrote:
> 
> I have a java application loaded by a PERL script thru CGI.  The loading
> 
> of the application works perfectly but when the applcation uses
> System.out.println to output some HTML code,  the output does not get to
> 
> the browser.  Any idea on how I could output from the Java application
> when called by a PERL script?
> 
> Claude Montpetit

How do you run the Java application? If it is via
the system() call, then I suggest you take a look
at the Perl documentation (perlfunc) about it, and
pay attention to the reference to back-ticks.

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: Sun, 24 Aug 1997 20:18:05 GMT
From: bill@chirons.demon.co.uk (Bill Hey)
Subject: Re:URL for Win32 Perl?
Message-Id: <3402969d.1686312@news.demon.co.uk>

>Hi Folks,

>I've not managed to find a site  which has the Win32 Perl (precomplied/built) for Win95 to download.
>The search engines have led me a merry dance.

Doh, I feel stupid.  I was filtering for FAQ in the group list and
actually managed to filter it OUT (the curse of spam)! I've since read
the mini faq, and have found what I was looking for.

Regards,

MWH

--
PGP Key fingerprint =
39 78 A9 62 76 1F 76 10  31 8C 4C B9 E3 18 B3 A5
Key available on request.


------------------------------

Date: Mon, 25 Aug 1997 00:36:40 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: server name
Message-Id: <3400A968.4846@icl.fi>

Danny LaPrade wrote:
> 
> Let me be more specific...
> 
>  I am doing a script for the web (CGI)
>  I want to know the servername of each person
>  who visits my page.

Your question doesn't really have anything to do
with Perl (even if you happen to use Perl as your
CGI scripting language). The answer is the same
regardless of the language used, and your question
would've been better in

  comp.infosystems.www.authoring.cgi

However, I wouldn't be surprised if the FAQ
(Frequently Asked Questions) list of c.i.w.a.c
above doesn't already address this.

Anyway, I assume you mean that you're running 
a system with multiple virtual web servers.

In that case, see the CGI spec at

  http://www.ast.cam.ac.uk/~drtr/cgi-spec.html

You'll see that the SERVER_NAME environment
variable should be set by the web server.

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


------------------------------

Date: 25 Aug 1997 00:21:36 +0200
From: Martin Fischer <mf@fishbone.ruhr.de>
Subject: Re: server name
Message-Id: <5tqc5g$c0p$1@fishbone.ruhr.de>

Danny LaPrade <dannyl@computize.com> wrote:
>Let me be more specific...

> I am doing a script for the web (CGI)
> I want to know the servername of each person 
> who visits my page.
You can get it with $ENV{'REMOTE_HOST'} if the person doesn't use
a proxy, else you get the name of the proxy.

ciao
Martin
-- 
Martin Fischer <mf@fishbone.ruhr.de>                    -------------------
               <Martin.Fischer@fh-bochum.de>           | Comp Sci Student
PGP key available at: http://localhost.ruhr.de/~martin | FH-Bochum, Germany
Unsolicited commercial e-mail will be proof-read for $199/hr.


------------------------------

Date: 24 Aug 1997 23:27:17 GMT
From: kisrael@allegro.cs.tufts.edu (Kirk L. Israel)
Subject: Trivial(?) readdir question
Message-Id: <5tqg0l$1l0$1@news3.tufts.edu>

How likely is readdir to NOT return '.' and '..' as the first two
directory entries when reading in a directory?  If I do a
open DIR,"/tmp";
@entries = readdir DIR;
shift @entries;
shift @entries;
close IDR;
how likely is this to not just remove . and .. and have @entries filled
with all the files and directories?  I know There's More Than One Way To
Do This and that doing a regex or strincompare wouldn't be THAT
innefficient.  It's just for a demo on Solaris and seems to work.  Just
wondering.


--
Kirk Is       | 
kisrael@      | "Life's too short to worry about it"
alienbill.com | 


------------------------------

Date: Sun, 24 Aug 1997 20:03:00 GMT
From: bill@chirons.demon.co.uk (Bill Hey)
Subject: URL for Win32 Perl?
Message-Id: <34009322.794987@news.demon.co.uk>

Hi Folks,

I've not managed to find a site  which has the Win32 Perl
(precomplied/built) for Win95 to download.

The search engines have led me a merry dance.

Please help folks,

Regards,

MWH
--
PGP Key fingerprint =
39 78 A9 62 76 1F 76 10  31 8C 4C B9 E3 18 B3 A5
Key available on request.


------------------------------

Date: Sun, 24 Aug 1997 11:35:09 -0600
From: Marcus A. Davis <marcus@alex.net>
Subject: We Need Help!!!
Message-Id: <872439980.30135@dejanews.com>

We are in immediate need of qualified perl, SQL, and Visual C++
programmers.  We are located in Indianapolis, Indiana.  The company
name is The Alexander Group, Inc. http://www.alex.net...Please respond!!

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


------------------------------

Date: 24 Aug 1997 12:37:39 -0700
From: Robert Nicholson <steffi@shell8.ba.best.com>
Subject: Why doesn't flocking a tied hash work?
Message-Id: <yl3iuwv4bjw.fsf@shell8.ba.best.com>


Whenever the commented lines are uncommented this script will fail
in the same process.

The wierd thing is that it fails at the tie with the die.

sub write_votes {
        my $vote = param('name');
        my $db;
        my $fd;

        $db = tie( %db, DB_File, 'docs/votesdb' , O_CREAT|O_RDWR, 06
66 ) || die "tie!";

        #while (($key,$val) = each %db) {
        #       print $key, ' = ', $val , "\n";
        #}

        $fd = $db->fd;

#        open(DB_FH,"+<&=$fd") || die "dup $!";
#        unless (flock(DB_FH, LOCK_EX)) { die "flock: $!" }

        if ($vote eq 'YES') {
                $db{'YES'}++;
        }
        if ($vote eq 'NO') {
                $db{'NO'}++;
        }
        untie( %db );
#	flock(DB_FH, LOCK_UN);
        close(DB_FH);
}





------------------------------

Date: 24 Aug 1997 23:00:12 GMT
From: "Martin Smallridge" <catflap@geocities.com>
Subject: Win95 from a very definite newbie... help please
Message-Id: <01bcb0e1$a3903b40$18537ec2@Kitty.Litter>

Ok.. simple question really.. I'm running win95 on a pentium 120 and for
the life of me can't work out what the heck an intelx86 build or alpha
build is.. so for starters I'm buggered.

So: could you help by telling me
1. which perl build / type do I need to get
2. how do I install it successfully?
3. are there any plans for a win95 faq which idiots like me who only know
how to program basic (so far) can read and understand without getting the
screaming heebie jeebies..

Please replay by email direct to

catflap@geocities.com

thanks.. any help will be MUCH appreciated.


------------------------------

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 915
*************************************

home help back first fref pref prev next nref lref last post