[7457] in Perl-Users-Digest
Perl-Users Digest, Issue: 1082 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 26 03:18:50 1997
Date: Fri, 26 Sep 97 00:00:33 -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 Fri, 26 Sep 1997 Volume: 8 Number: 1082
Today's topics:
??? TiffInfo or TiffHandle in PERL <ziziz@worldnet.att.net>
Re: alarm(n) works but not consistently ..... (Charles DeRykus)
Re: Changing same line in all HTML pages (Eric)
Re: Dummy variable - can you avoid it (Charles DeRykus)
GD gifs on disk take up memory!!!???!!! doug@wkp.com
How do I Find a CGI Programmer? <atlantis@dnai.com>
Re: how to write HTML form data to a text file??? (Martien Verbruggen)
Re: HTTP Query in perl (Abigail)
Re: Is Perl Year2000 compliant? (Daniel E. Macks)
Linking HTML forms with PERL scripts in Win 95 <wcw@onramp.net>
Long. redundancy check <arnoud@best.com>
mirror.pl in NT -- Anyone have any luck? (Jason Thornbrugh)
Re: Perl <=> C Server (dave)
perl complilator <drosquil@campus.chs.itesm.mx>
Re: perl complilator (Tad McClellan)
Re: Perl crashing RS600 box (Mike Heins)
Perl Guru - HELP on Compiler and dbm (Engineer)
Perl on AS/400 <param@sunway.com.sg>
Re: Perl Programmer in Los Angeles (Pasadena) are <tmh@possibility.com>
Perl script is not executed by Web browser <Larry_P_Nguyen@qmail2.sp.trw.com>
Perl script is not executed by Web browser <Larry_P_Nguyen@qmail2.sp.trw.com>
predictable random numbers across continued runs (Zachary Brown)
Re: Send mail with cgi on NT (Daniel E. Macks)
Re: socket to http (Ben Reser)
Re: Text::English <randy@theory.uwinnipeg.ca>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 26 Sep 1997 03:21:43 -0400
From: zizi zhao <ziziz@worldnet.att.net>
Subject: ??? TiffInfo or TiffHandle in PERL
Message-Id: <60fki7$sk8@bgtnsc03.worldnet.att.net>
Is there any PERL utility to get TiffInfo from an
image.tiff, or execute shell command
% tiffinfo image.tiff
to return information of tiff images files like
what we have
($size, $atime, $mtime, $ctime) = (stat($file))[7, 8, 9, 10];
for any UNIX file?
ZiZi
zizi@wbfa.com
ziziz@worldnet.att.net
------------------------------
Date: Fri, 26 Sep 1997 01:56:57 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: alarm(n) works but not consistently .....
Message-Id: <EH3Eqx.Fzx@bcstec.ca.boeing.com>
In article <60e372$4nn@cnj.digex.net>,
Atiqullah Hashmi <hashmi@cnj.digex.net> wrote:
> Hi,
>
> I am using alarm(n) and catching the SIGALRM which works but not
> properly always. Actually I am reading a pipe to a child process
> and want to interrupt if don't get answer in n secs. Then I reset
> it. The idea being that on Unix, a read call is interrupted if
> the SIGALRM signal goes off.
> Here is how I am doing it:
>
> sub handler {
> local($sig) = @_;
> print STDOUT "cnt_ns.pl timed out\n";
> $gotalarm=1;
> alarm(0);
> }
>
> #set alarm
> $SIG{'ALRM'} = 'handler';
> alarm(10);
> $gotalarm=0;
>
>
> .... write next input and read pipe from child process
>
> # reset alarm
> alarm(0);
> $SIG{'ALRM'} = 'DEFAULT';
> if ($gotalarm){
> do something ....
> }
> $gotalarm=0;
>
>
> Sometimes alarm goes off in 10 secs. but sometime it takes much longer
> like minutes on reading the pipe (and I start thinking the
> alarm did not work) however, still I see that handler() prints 'timed
> out' msg. meaning handler was invoked. I run the above setup in a program
> loop, so I need the alarm working at n secs. in every loop run.
>
> So, is it that alarm is working exactly in 10 secs. and somehow
> the system is not telling me in time ? OR
> I am not setting it right ?
>
Is it possible, the read call is restarting...say if a big
chuck of data comes down the pipe and the read is still
in progress? Then you'd see the behavior you describe:
the signal handler gets called but the read is immediately
restarted so the time out does nothing except your print.
(BTW, print is a bad idea in signal handler since that's
not reentrant call).
You might have more luck with a select time as Tom
mentioned or a die/eval block, e.g,
$SIG{ARLM} = sub { die "time out" };
LOOP: {
alarm(10);
eval { read .... };
alarm(0);
if ($@ =~ /^time out/) {
print "timed out\n";
next LOOP;
} elsif ($@) {
die "eval error: $@";
} else {
# ok
}
}
HTH,
--
Charles DeRykus
------------------------------
Date: 26 Sep 1997 06:41:03 GMT
From: pojo@gte.net.nospam (Eric)
Subject: Re: Changing same line in all HTML pages
Message-Id: <60fldv$jhm$1@gte1.gte.net>
On 25 Sep 1997 15:29:16 GMT, koos_pol@nl.compuware.com.NO_JUNK_MAIL (Koos Pol)
wrote:
>Does someone have a script laying around for changing the same line in
>all your HTML pages? E.g. a different footer or a specific link.
>I know it's not difficult, but why go through the same if someone
>already did it, right?
You're using a sledgehammer to swat a fly. Just pick up a decent text
editor with multiple file search & replace. If you're using Win 95, a decent
freeware editor is "Super NoteTab":
http://www.unige.ch/sciences/terre/geologie/fookes/
------------------------------
Date: Thu, 25 Sep 1997 23:12:13 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Dummy variable - can you avoid it
Message-Id: <EH374E.5vA@bcstec.ca.boeing.com>
In article <60dl2p$nej$1@news.rwth-aachen.de>,
Helmut Jarausch <jarausch@numa1.igpm.rwth-aachen.de> wrote:
> Hi,
>
> I often have the situation where I want to feed a string to a 'sub'
> after modification.
>
> How can one get rid of $DUMMY and the do {} block in the following
> very ugly code
>
> sub foo;
>
> $s= "....."; # please don't modify me !
>
> foo( do {(my $DUMMY = $s) =~ s/abc/aBc/g;$DUMMY} );
>
>
> Sorry for this esotheric question - I am just looking for that famous
> 'there is a more elegant way to do it'.
>
Not necessarily more elegant but why not eliminate the
do block and sweep some of the mess into the sub
itself, e.g,
foo($s);
sub foo { (my $s = $_[0]) =~ s/abc/aBc/g; ... }
HTH,
--
Charles DeRykus
------------------------------
Date: Fri, 26 Sep 1997 00:21:38 -0600
From: doug@wkp.com
To: doug@wkp.com
Subject: GD gifs on disk take up memory!!!???!!!
Message-Id: <875248642.15353@dejanews.com>
Hello everyone!
I've ran into a strange problem while using GD 1.14. I am running
perl 5.004_03 on a FreeBSD 2.2.2 P6 200 workstation.
Here's the problem: I wrote a script that generates images for a
web-based game I'm working on. It takes a source image, and makes
random portions of it transparent. So the user gets a stream of
images with portions getting gradually more and more transparent so
they can see the image underneath and guess what it is. Well, the
script that generates the images (200x200, anywhere from 1x1 to 20x20
pixel size) seems to have this strange habit of taking up in memory
the amount of space they take on the disk. Has me absolutely stumped.
I can watch my memory drip away as the script runs. Once it's done I
have a directory full of images and there are no perl processes
running. Here's the weird part... once I delete the files, I get all
my memory back!!??!! I am just missing something totally obvious
here?
perl -v and -V follows this and then the script itself. It's kinda
screwy right now as it makes the images backwards, i.e. #0 is the
image with no blocked portions (i.e. totally transparent) and the last
image is the one that is totally opaque. I did a search on the web
for gd perl and gif and searched dejanews for anything in the
archives... hmm... Well if anyone can make head or tails of this I'd
appreciate it. Thanks a lot!
Doug Beaver
This is perl, version 5.004_03
Copyright 1987-1997, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or theGNU General Public License, which may be found in the Perl 5.0
source kit.
Summary of my perl5 (5.0 patchlevel 4 subversion 3) configuration:
Platform:
osname=freebsd, osvers=2.2.2-release, archname=i686-freebsd
uname='freebsd <CENSORED> 2.2.2-release freebsd 2.2.2-release #0:
thu
sep 11 20:20:44 pdt 1997 <CENSORED>:usrsrcsyscompilestretch i386 '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=n useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=2.7.2.1
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=true
voidflags=15, castflags=0, d_casti32=undef, d_castneg=define
intsize=4, alignbytes=4, usemymalloc=n, randbits=31
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-lgdbm -lm -lc -lcrypt
libc=/usr/lib/libc.so.3.0, so=so
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags=' '
cccdlflags='-DPIC -fpic', lddlflags='-Bshareable
-L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under freebsd
Compiled at Sep 11 1997 20:44:09
@INC:
/usr/local/lib/perl5/i686-freebsd/5.00403
/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/i686-freebsd
/usr/local/lib/perl5/site_perl
.
#!/usr/local/bin/perl -w
# Copyright 1997 Douglas Beaver All Rights Reserved
use GD;
use strict;
my ($width, $height, $pixelsize, $i, $j, $computed_height,
$computed_width,$y, $x, @array, $num, $doug, $hans, $franz, $start_x,
$end_x, $start_y, $end_y, $ex, $why, $image, $gray, $data);
open(GD_GIF, "/usr/local/images/game01/01/100.gif") or die $!;
$image = newFromGif GD::Image('GD_GIF') or die $!;
close GD_GIF;
$gray = $image->colorAllocate(127,127,127);
$width = 200;
$height = 200;
$pixelsize = 5;
$i=0;
$computed_height = $height / $pixelsize;
$computed_width = $width / $pixelsize;
# Generates an array that holds x/y values for the "virtual pixels"
# and so you pick a random element of that array and splice it each
# time you want to make a random pixel transparent
for $y (0..$computed_height - 1) {
for $x (0..$computed_width - 1) {
$array[$i] = "$x|$y";
$i++;
}
}
$j = 0;
while (scalar @array > 0) {
$num = rand @array;
$doug = splice(@array, $num, 1);
# This turns the virtual pixel into all gray
&color_me_badd($doug);
# This turns the gray into transparent
$image->transparent($gray);
open(NEWGIF, ">/usr/local/images/game01/02/$j.gif") or die $!;
$data = $image->gif;
print NEWGIF $data;
close NEWGIF;
print "$j\n";
$j++;
}
sub color_me_badd {
($hans, $franz) = split '\|', $_[0];
$start_x = $hans * $pixelsize;
$end_x = ++$hans * $pixelsize -1;
$start_y = $franz * $pixelsize;
$end_y = ++$franz * $pixelsize -1;
for $why ($start_y .. $end_y) {
for $ex ($start_x .. $end_x) {
$image->setPixel($ex, $why, $gray);
}
}
}
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 25 Sep 1997 22:36:31 +0000
From: JR <atlantis@dnai.com>
Subject: How do I Find a CGI Programmer?
Message-Id: <342AE76F.368A@dnai.com>
Recently I asked for advice in finding resources to help me, a complete =
novice, learn about CGI scripting in Perl for the web. The good folks =
reading this newsgroup sent me many helpful replies and I wish to thank =
all of you.
Inasmuch as writing the CGI for a site may be beyond my own personal =
capabilities for some time to come, I have entertained the thought of =
hiring someone to write some scripts for my site. I=B9ve tried to find =
someone to do so but it hasn=B9t been easy. I looked in a local computer =
newsprint publication (Computer Currents) and did some searching on the =
net, but didn=B9t find much. I guess I just don=B9t know where to look. Doe=
s =
anyone have any suggestions where to look?
At the same time, if any reader of this group is both experienced and =
interested in writing CGI for the www, and would be comfortable doing so =
for an adult site, is interested in discussing the matter, please send =
email directly to atlantis@dnai.com.
Thanks again to all who replied to my original post.
Jay Russell
------------------------------
Date: 26 Sep 1997 02:17:19 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: how to write HTML form data to a text file???
Message-Id: <60f5vf$7ac$1@comdyn.comdyn.com.au>
In article <3429A4CB.57B30663@netobjects.com>,
Scott Kahn <scott@netobjects.com> writes:
> There are a billion Perl scripts on the Web that capture the contents of
> an HTML form and E-mail them to someone, but what I want to do is to
> take the form contents and append them to a text file sitting on my
> server (I'll later import the data into a database).
Just use open to open the file, print to print your variables into it,
in some format. Make sure you can write to the file, check the return
code of open.
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 26 Sep 1997 04:53:00 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: HTTP Query in perl
Message-Id: <slrn62mg1c.235.abigail@betelgeuse.rel.fnx.com>
Nicolas Ross (Nicolas.Ross@videotron.ca) wrote on 1487 September 1993 in
<URL: news:MPG.e94c6c61a741a4f989681@news.videotron.ca>:
++ Hi !
++
++ I am rather a novice in perl programming, but I know a little.
++
++ What I wanna do is make a HTTP request.
++
++ Exactly, my script will take information passed to it, un scamble it and
++ make a request to a CGI script on a web page.
++
++ e.g. http://www.server.com/cgi-bin/script?var1=data1&om!nvar2=data2
++
++ How could I do that ??
#!/usr/local/bin/perl -wT
use strict;
use LWP;
my $agent = new LWP::UserAgent;
$agent -> name ("Porky's dilemma");
my $request = new HTTP::Request GET => "http://www.server.com/cgi-bin/script?var1=data1&om!nvar2=data2";
my $response = $user_agent -> request ($request);
if ($response -> is_success) {
# Do something with $response -> content;
}
else {die $response -> error_as_HTML;}
__END__
And if you also want to automate the creation of the
'var1=data1&om!nvar2=data2' part, use the other excellent
module CGI.
++ P.S. Please reply via e-mail...
Not without a good reason. If you can't be bothered to read the
group after asking a question, a solution wasn't important.
Abigail
------------------------------
Date: 26 Sep 1997 05:53:02 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: Is Perl Year2000 compliant?
Message-Id: <60fiju$ptp$2@netnews.upenn.edu>
lvirden@cas.org said:
:
: Is there a command parallel to perldoc perhaps called perlgrep someone
: might have written which allows you to say
:
: perlgrep 2000
:
: which searches all the docs installed to find references to year 2000
: for instance?
There isn't (that I know of, but I didn't check CPAN or RTFM *G*), but
you could write it, and thus become famous. This is, of course, a
supplement for a perl-wide-web search, which even gets references in
uninstalled docs and works on systems where perl itself is hosed.
dan
--
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
------------------------------
Date: Thu, 25 Sep 1997 23:19:46 -0500
From: Bill Whitehead <wcw@onramp.net>
Subject: Linking HTML forms with PERL scripts in Win 95
Message-Id: <342B37E2.5C83695E@onramp.net>
I am a PERL newbie. I loaded PERL on my Windows 95 machine, and am
attempting to use the local PERL interpreter to check out HTML and PERL
code before uploading to the CGI-BIN on my server. But, I can find no
documentation on how to make PERL respond properly on my local computer
(plenty of documentation on how to make it work on a remote server). Is
this a "piping" problem? When my HTML code says <form
name="testquestion1" action="hello.pl" method="get"> the computer
responds to my "submit" button by opening a MS-DOS window and running
the perl script within that window, rather than sending the output back
to my browser. I would really appreciate your help.
--Bill Whitehead
wcw@onramp.net
------------------------------
Date: 26 Sep 1997 03:48:03 GMT
From: Arnoud W. Morsink <arnoud@best.com>
Subject: Long. redundancy check
Message-Id: <60fb9j$nht$1@nntp1.ba.best.com>
Hi. Would anyone know where I could find some Perl code
to calculate the LRC for a string of characters?
--
Arnoud
------------------------------
Date: Fri, 26 Sep 1997 00:54:12 GMT
From: jthornbr@legato.com (Jason Thornbrugh)
Subject: mirror.pl in NT -- Anyone have any luck?
Message-Id: <343007af.3525622@nntp.best.com>
I have been having a bad time with mirror in NT.
I need to know if anyone has gotten it working under NT. If so I
would appreciate some feedback. If you have a modified script that
you have working, I would be interested in a copy.
I have downloaded and installed the latest build of perl for NT
(5.0.110, I think) and the latest mirror script (2.8, I think). I
have noticed several simple things that need changed (/dev/null
references, path delimiter references, inimplemented calls, etc.)
Unfortunately I do not have the time to devote to debugging mirror in
an NT environment.
Mirror is the _only_ program I have been able to find that fits my
needs for directory recursion and operation without manual
intervention.
Jason Thornbrugh
Systems Engineer
Legato Systems, Inc
jthornbr@legato.com
------------------------------
Date: Fri, 26 Sep 1997 00:33:08 GMT
From: over@the.net (dave)
Subject: Re: Perl <=> C Server
Message-Id: <342b026a.540681@news.one.net>
aml@world.std.com (Andrew M. Langmead) wrote:
>over@the.net (dave) writes:
>>>Andrew M. Langmead wrote:
>
>>>> could be converted like this:
>>>>
>>>> ($name, $id) = unpack 'A32I', $data;
>>>
>
>>I'm surprised that this works for you. Exactly how does Perl know the
>>last valid character in the name?
>
>The 'A' unpack template strips trailing nuls and spaces. This
>behaviour is documented in the entry on pack in the perlfunc man page.
>
So the secret is they have to be _trailing_ spaces! Just a single nul
or space in the 32 chars won't do, will it? Thanks I think I finally
understand. I will try it tomorrow.
Dave
|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:
| dlripber@one.net
|________
------------------------------
Date: Thu, 25 Sep 1997 17:56:50 -0500
From: Dirk Rosquillas <drosquil@campus.chs.itesm.mx>
Subject: perl complilator
Message-Id: <342AEC32.1CFB@campus.chs.itesm.mx>
I need to compile some perl script
(make is executable without the perl program)
how do i do it?
--
Dirk Rosquillas
WebMaster
Campus Chiapas
www.chs.itesm.mx webmaster@campus.chs.itesm.mx
drosquil@campus.chs.itesm.mx
------------------------------
Date: Thu, 25 Sep 1997 21:33:32 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: perl complilator
Message-Id: <st6f06.hf3.ln@localhost>
Dirk Rosquillas (drosquil@campus.chs.itesm.mx) wrote:
: I need to compile some perl script
: (make is executable without the perl program)
: how do i do it?
You do a word search for 'compiler' in the free documentation
that is included with the perl distribution.
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Sep 1997 04:20:49 GMT
From: mheins@prairienet.org (Mike Heins)
Subject: Re: Perl crashing RS600 box
Message-Id: <60fd71$f6v$1@vixen.cso.uiuc.edu>
Bob Melson (bob_melson@phx.mcd.mot.com) wrote:
: Mike Heins wrote:
: >
: > Michael McCrann (mccrann_michael@jpmorgan.com) wrote:
: > : A perl script I was running on my RS6000 AIX3.2 server caused the server
: > : to crash. Can anyone tell me how I can report this bug and find out if it
: > : can be fixed.
: > :
: >
: > If a perl script can cause your OS and server to crash, it is a
: > definite bug in your OS and only possibly a bug in Perl.
: >
: > Of course, in the case of AIX, if you are root and are
: > modifying some of their control structures (I forget what they
: > call them, but it is like NT's registry) then all bets are off,
: > and it is likely a bug in your code.
: >
: Contrary to popular belief, AIX ain't so bad. Without seeing the
: original poster's script, I'd be more inclined to believe that the bug
: is in the script and not in the o/s. WRT the ODM database (the NT
: registry-like control structures you allude to), yeah, screwin' with
: them can have definite adverse effects.
:
I don't think I said it was bad. 8-) I was trying to be kind
to the poster rather than the OS.
AIX definitely is strange, though, for someone coming from a more
mainstream Unix. When I was with a company that did device driver
code we had many struggles with the ODM -- I am sure as many with
our understanding of the thing as from defects. Of course by the
time we were done, we had one of the slickest little SMIT installs
around -- certainly the best I saw from a third party to that
date.
Our developers did find plenty of bugs in 3.1.x, though I believe
most were shaken out by the time 3.2 came out.
Regards,
Mike
------------------------------
Date: 25 Sep 1997 21:37:48 -0700
From: engineer@best.com (Engineer)
Subject: Perl Guru - HELP on Compiler and dbm
Message-Id: <60fe6s$hi9$1@shell6.ba.best.com>
I just started using Malcolm's compiler. It works well except dealing
with dbm.
My test script is :
#!/usr/local/bin/perl5
use AnyDBM_File;
dbmopen (%TEST, "DBM", 0644) || die "can't open dbm : $!";
dbmclose (%TEST);
It works fine without compiling.
If compiled under Malcolm's compiler (3a, Solaris) using:
perl5 -MO="C,-odbmopen.c,-uAnyDBM_File" dbmopen.pl
perl5 cc_harness -o dbmopen dbmopen.c
I got:
dbmopen.pl syntax OK
gcc -I/usr/local/include
-I/usr/local/lib/perl5/sun4-solaris/5.003/CORE \
-o dbmopen dbmopen.c -L/usr/local/lib
-L/usr/local/lib/perl5/sun4-solaris/5.003/CORE \
-lperl -lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt
When "dbmopen" is run:
AnyDBM_File doesn't define a TIEHASH method at dbmopen.pl line 8
Bad free() ignored.
What is wrong? Any hint will be appreciated!
--
Greg
gic@xeti.com
------------------------------
Date: Fri, 26 Sep 1997 09:02:02 +0800
From: Param V <param@sunway.com.sg>
Subject: Perl on AS/400
Message-Id: <342B0989.5BC0@sunway.com.sg>
Hi
Could you please help me setup Perl on AS/400 including HTTP
configuration on AS/400.
Thanks
Param
------------------------------
Date: Thu, 25 Sep 1997 18:54:12 -0700
From: Todd Hoff <tmh@possibility.com>
Subject: Re: Perl Programmer in Los Angeles (Pasadena) are
Message-Id: <342B15C4.6566@possibility.com>
Diran Afarian wrote:
>
> Hi All,
>
> I am looking for a perl programmer in the Pasadena are that can do
> some programming. If anyone is available please let me know. Also let me
> know how you charge.
Can you work with someone remotely?
------------------------------------------------------------------
tmh@possibility.com | I have no interest in any ship that
http://www.possibility.com | does not sail fast, for I plan to go
| in harm's way. -- J.P. Jones
------------------------------
Date: Thu, 25 Sep 1997 18:26:11 -0700
From: Larry Nguyen <Larry_P_Nguyen@qmail2.sp.trw.com>
Subject: Perl script is not executed by Web browser
Message-Id: <342B0F33.5D13@qmail2.sp.trw.com>
I got the following error when running a Perl script from a web browser
(ie. http://oassis.xyz.com/cgi-bin/howdy.pl)
"HTTP/1.0 403 Access Forbdden (Read Access denied. This virtual
directory does not allow objects to be read."
It appears to me that the browser did not attempt to execute the Perl
cmd which then run the Perl script. It tries to READ the script instead.
Could some one please help?
I've done the following:
- Set up Perl's extension (assoc .PL), FTYPE (PERL=...), PATHEXT so
that when I run a Perl script (howdy.pl) at the DOS's command line
(c:\inetpub\wwwroot\cgi-bin\howdy) the script runs automatically and
successfully.
- I installed the Perl script (howdy.pl) to a valid directory which is
set up by IIS (c:\inetpub\wwwroot\cgi-bin). This directory is set up
with the correct permission to EXECUTE.
------------------------------
Date: Thu, 25 Sep 1997 18:27:21 -0700
From: Larry Nguyen <Larry_P_Nguyen@qmail2.sp.trw.com>
Subject: Perl script is not executed by Web browser
Message-Id: <342B0F79.3485@qmail2.sp.trw.com>
I got the following error when running a Perl script from a web browser
(ie. http://oassis.xyz.com/cgi-bin/howdy.pl)
"HTTP/1.0 403 Access Forbdden (Read Access denied. This virtual
directory does not allow objects to be read."
It appears to me that the browser did not attempt to execute the Perl
cmd which then run the Perl script. It tries to READ the script instead.
Could some one please help?
I've done the following:
- Set up Perl's extension (assoc .PL), FTYPE (PERL=...), PATHEXT so
that when I run a Perl script (howdy.pl) at the DOS's command line
(c:\inetpub\wwwroot\cgi-bin\howdy) the script runs automatically and
successfully.
- I installed the Perl script (howdy.pl) to a valid directory which is
set up by IIS (c:\inetpub\wwwroot\cgi-bin). This directory is set up
with the correct permission to EXECUTE.
------------------------------
Date: 25 Sep 1997 21:22:34 -0400
From: zbrown@lynx.dac.neu.edu (Zachary Brown)
Subject: predictable random numbers across continued runs
Message-Id: <60f2oq$bt6@lynx.dac.neu.edu>
I have a program that uses random numbers to implement a genetic
algorithm. I can break out of a run and continue it later by storing the
breeding information in a file. But when I continue it later, the random
number generator is reset to its original starting point, rather than
continuing from where it left off. Thus the program behaves differently
if it is stopped and restarted than if it is left in a single run.
This is unacceptable. I must have a way to keep the program
deterministic. Is there any way to have perl continue generating random
numbers from where it left off, using rand() and srand()? I would prefer
not to have to write my own random number generators, since perl already
has one.
If there is no way to do this, I'd like to suggest to the developers that
maybe a way should be provided in a future release of perl. Maybe a
getseed() function, which returns a number that should be used as the
random number seed on a continued run, to ensure than the random numbers
will be the same as if the run were uninterrupted.
Thank you,
Zack
------------------------------
Date: 26 Sep 1997 05:58:29 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: Send mail with cgi on NT
Message-Id: <60fiu5$ptp$3@netnews.upenn.edu>
Neil Briscoe (neilb@zetnet.co.uk) said:
: In article <342934D2.F50D5A08@voigtgmbh.de>, kosthoff@voigtgmbh.de (Kai
: Osthoff) wrote:
:
: > How can I send a filled form with CGI to a specify eMail-Adress ?
: > At Unix-Systems perl's use often SENDMAIL ... what must i use on
: > WindowsNT ?
:
: Well, you can either purchase Metainfo's NT Port of Sendmail and then most
: scripts will work unchanged, or, you can have a free copy of my smtp.pl.
:
: The latter was hacked from the work of Graham Barr's smtp.pm - which I
: never could get to work under NT.
Or I think there are other options...perhaps a glace at the FAQ? I
heard a rumor there might even be an entire FAQ devoted to WinNT
issues. You be the judge: http://language.perl.com/faq/index.html
dan
--
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
------------------------------
Date: Fri, 26 Sep 1997 03:27:25 GMT
From: ben@reser.org (Ben Reser)
Subject: Re: socket to http
Message-Id: <342b28b8.31513273@192.168.0.1>
Dirk,
Save your self some trouble and use LIBWWW-Perl.
You can find it on CPAN at:
http://language.perl.com/cgi-bin/cpan_mod?module=LWP
It'll handle all the socket code for you.
You can do something like this and $contents will contain the page
contents:
use LWP::UserAgent;
my ($ua) = new LWP::UserAgent;
my ($request) = new
HTTP::Request('GET','http://www.perl.com/index.html');
my($response) = $ua->request($request);
my($contents) = $response->content;
For more information do this and read:
perldoc LWP::UserAgent
On Thu, 25 Sep 1997 16:11:43 -0500, Dirk Rosquillas
<drosquil@campus.chs.itesm.mx> wrote:
>How do i create a socket to connect to an http server..
>
>I know the transfer methods, I mean "GET /index.html HTTP/1.0"
>and all the header stuff but I dont know how to get connected
>
>Im actually trying to get a file without a browser.. and in the unix
>kernel
>
>
>
>
>
>--
>Dirk Rosquillas
>WebMaster
>Campus Chiapas
>www.chs.itesm.mx webmaster@campus.chs.itesm.mx
>drosquil@campus.chs.itesm.mx
************************* IMPORTANT *************************
Why the new email address you ask?
Simple, I'm attempting to simplify the way I filter my mail.
Please direct all personal mail to ben@reser.org
Not directing personal mail to this address may cause
delays in me reading your mail or may even get it deleted.
************************ IMPORTANT *************************
---
Ben Reser <ben@reser.org>
http://ben.reser.org
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d-(+)@ s:- a-- C++++$ UBVC++++(++)$ P+++$>++++ L- !E---- W@ N(+)>++ o? K--? w++$@>+++ !O---- !M V PS+(++)@>+++ PE++(+++)@ Y+(++)@ PGP+(++)>+++ t+()@ 5 X !R tv-(+)@>-- b+(++)>+++ DI++ D G e h++ r-()>+++ y?
------END GEEK CODE BLOCK------
------------------------------
Date: Thu, 25 Sep 1997 09:52:29 -0500
From: Randy Kobes <randy@theory.uwinnipeg.ca>
Subject: Re: Text::English
Message-Id: <Pine.GSO.3.96.970925094902.14378A-100000@theory.uwinnipeg.ca>
On Tue, 23 Sep 1997, Gene Hsu wrote:
> Does anyone know where to find this module? I haven't been able to find
> it in CPAN, though it's mentioned (barely) in one of the author lists.
> I'd like to get it so I can try out some of the Information Retrieval stuff
> from the perl journal.
>
> -- Gene
>
>
Hi,
A Text::English package is contained in
$CPAN/authors/id/ULPFR/perlindex-1.200.tar.gz
Best regards,
Randy Kobes
Physics Department Phone: (204) 786-9399
University of Winnipeg Fax: (204) 774-4134
Winnipeg, Manitoba R3B 2E9 e-mail: randy@theory.uwinnipeg.ca
Canada WWW/ftp/gopher: theory.uwinnipeg.ca
------------------------------
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 1082
**************************************