[8557] in Perl-Users-Digest
Perl-Users Digest, Issue: 2174 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 24 18:07:59 1998
Date: Tue, 24 Mar 98 15:00:39 -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 Tue, 24 Mar 1998 Volume: 8 Number: 2174
Today's topics:
Any saner syntax for Objects? (Joonas Timo Taavetti Kekoni)
Re: ARRRG! "recommended" CPAN update stopped CPAN modul (James B. Crigler)
Re: Creating an array for e-mail addresses for online f <alleycat@scn.org>
Re: Form Textarea and \n issue (brian d foy)
Re: Going Rates for PERL Programming??? <stuartc@ind.tansu.com.au>
hard reference, variable names ? <prl2@lehigh.edu>
Help: Still have AS400 Perl Savf Install Problems. <julianje@iname.com>
Re: How to attach files with Sendmail. <jkry3025@comenius.ms.mff.cuni.cz>
Interpolating into a variable? How to? <keithmur@mindspring.com>
Re: Is there a "Newsgroup" for Newbies to Perl? (MICHELLE MARIE HANKINS)
Re: Is there a "Newsgroup" for Newbies to Perl? (I R A Aggie)
Re: Is there a "Newsgroup" for Newbies to Perl? (Abigail)
Is this wise way to do this? (Joonas Timo Taavetti Kekoni)
L. Wall in Seattle 3/25 with SPUG (Seattle PERL Users Group)
Re: Lazy question.. (MICHELLE MARIE HANKINS)
Re: Perl programmers wanted to join our project (brian d foy)
Re: Perl/CGI for Apache 1.3b3 for Win95 <cortez@tfn.com>
Print Out Image in CGI/PERL <Jonathan.larouche@enter-net.com>
Re: Print Out Image in CGI/PERL <abennett@stonehill.edu>
Re: Strange behavior with NET:Ftp under Cron <abennett@stonehill.edu>
Re: suid under AIX (courtesy)
Re: Trouble with GD.pm on Win32 Perl ender@mythen.ch
Re: Wanted: Perl for Windows 3.x <dave@turfpit.demon.co.uk>
Re: Wanted: Perl for Windows 3.x (Richard Bellavance)
Re: Why hasn't there been a vote on moderating cplm yet <jim.michael@gecm.com>
Re: Why hasn't there been a vote on moderating cplm yet (John Stanley)
{block} orinted <FILE> descriptors (Joonas Timo Taavetti Kekoni)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Mar 1998 22:09:21 GMT
From: jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni)
Subject: Any saner syntax for Objects?
Message-Id: <6f9auh$nfb$2@hiekkalaatikko.cs.hut.fi>
Packge STACK;
use strict;
sub new ()
{
my @stack=("XXX"); #sentinel
my $this;
$this->{STACK}=\@stack;
#or $this=\@stack , but that wouldn't receive other element...
# $this->{NUM}=0;
bless( $this );
return $this;
}
sub put_val($)
{ my $this=shift;
my($a)=@_;
push( @{$this->{"STACK"}} ,$a); # this is almous as complex as STL
}
sub get_val()
{ my $this=shift;
return( pop @{$$this{STACK}} ); # a little better
#why not return( pop @$$this{STACK} );? or even better
# return ( pop @$this{STACK} ); but then $this would have to be %this, which
# fails...
}
1;
-- I would perefer something like this ;-) ---
# WARNING THIS NOT VALID CODE OF ANY LANGUAGE
use strict;
package Stack
{
use vars qw( $instances );
$instance=0;
my @stack;
new()
{ @stack=[];
$instances++;
}
sub put_val($)
{
push( @stack,$_[0]);
}
sub get_val()
{ return shift(@stack );
}
DESTROY()
{ $instances--;
}
} 1;
#OK END of joke...
--
_- Joonas Kekoni OH2MTF I -_
_-internet: jkekoni@cc.hut.fi I DO NOT EAT. -_
_-slowmail: j{mer{ntaival 7a176 I -_
_- 02150Espoo I It is a monitor -_
_- Finland/Europe I -_
------------------------------
Date: 24 Mar 1998 17:49:01 -0500
From: crigler@seo.com (James B. Crigler)
To: Michael J Gebis <gebis@albrecht.ecn.purdue.edu>:
Subject: Re: ARRRG! "recommended" CPAN update stopped CPAN module from working!
Message-Id: <lzg1k7zov6.fsf@jim.seo.com>
>>>>> "Michael" == Michael J Gebis <gebis@albrecht.ecn.purdue.edu> writes:
Me> So I logged on as root, ran
Me> perl -MCPAN -eshell
Me> It ran and installed. I exited to the root prompt, then
Michael> Install the IO patch by hand (not using the CPAN module) and
Michael> see if that helps. (I think the same problem happened to
Michael> me.)
That was it! Many thanks! The problem was that the Makefile generated by "perl Makefile.PL" needed UNINST=1 set, recommended it in the output of the automatic make, but didn't perform it, leaving (at least) part of the old version in place, making it inconsistent.
--
Jim Crigler <crigler@seo.com>
Schwartz Electro-Optics, Inc. Voice: (407)298-1802 x200
3404 N. Orange Blossom Trl. Fax: (407)290-9666
Orlando FL 32804-3498 USA
------------------------------
Date: Tue, 24 Mar 1998 13:52:07 -0800
From: Beeb <alleycat@scn.org>
Subject: Re: Creating an array for e-mail addresses for online form
Message-Id: <35182B07.6A4A65B8@scn.org>
javascript code is useless because many people either don't have
javascript capablility in the first place (including all text browsers
like Lynx) or have turned it off because some commercial sites use
javascript to "spam" endless unwanted windows.
Bob B.
MistaK wrote:
>
> On Tue, 17 Mar 1998 15:10:47 -0500, Kurt Stype <kurt.stype@bani.com>
> wrote:
>
> Try this javascript code to do the trick ;-)
>
------------------------------
Date: Tue, 24 Mar 1998 17:01:31 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Form Textarea and \n issue
Message-Id: <comdog-ya02408000R2403981701310001@news.panix.com>
Keywords: from just another new york perl hacker
In article <MPG.f81ae7dd7b5d93f98968e@news.greatbasin.net>, mknutson@websolution.com (Mick Knutson) posted:
>If you notice that the user hits return and creates a \n newline many
>times. I would like to know how to parse this out to create just
>formatting upon screen size with HTML. It should look like this:
in such instances i simply replace \n, \r, \t with spaces:
* simple translation
tr/\r\n\t/ /;
* simple substitution (also collapses multiple spaces)
s/[\n\r\t ]+/ /g;
one thing to watch out for is \n\n (or \r\n\r\n), which might indicate
a paragraph break. to retain these, you might first translate them
to some special character (i like to use \f), perform your
substitutions, then translate the special character back to the blank
line.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: 25 Mar 1998 09:34:13 +1100
From: Stuart Cooper <stuartc@ind.tansu.com.au>
Subject: Re: Going Rates for PERL Programming???
Message-Id: <yeo1zvr90re.fsf@kudu.ind.tansu.com.au>
wef@N0SPAM_wef.net (Wef) writes:
> Here's what my one and only client told me about the going rates for
> PERL/CGI scripting for the WWW.
> $45/hour for "tweaking" existing scripts. Meaning the client wants ou
> to change a few lines in a 'formmail.pl' script for instance...
> $100/hour for custom scripting... Meaning the client wants something
> entirely different than what he/she can find on the web...
> How do these rates compare....????
The rate for tweaking < The rate for custom scripting
45 < 100.
Regards,
Stuart Cooper.
stuartc@ind.tansu.com.au
------------------------------
Date: Tue, 24 Mar 1998 16:34:13 -0500
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: hard reference, variable names ?
Message-Id: <6f98sf$v5q@fidoii.cc.Lehigh.EDU>
In my program I said 'use strict vars' and declared %M, %F, and %T. In the
code snippet below, I want to add keys and values to these hashes.
The problem is with this line:
$sex{$offer} = $sth->fetchrow_array;
I want this to update %M and %F, depending on which value $sex is currently
set to, but instead it tries to update %sex. (Which causes the script to
die, as I haven't declared %sex.)
How can I use a variable as the hash name, in the same manner that I use a
variable for the hash key?
I thought I might try:
$$sex{$offer} = $sth->fetchrow_array;
but 'use strict' doesn't allow symbolic references. (I don't want to delete
the 'use strict' line as I am a young programmer and understand it to
protect me from dull-witted mistakes.) May I use hard references in some
way?
CODE:
____________________________________
<snip...>
foreach $coll (@coll_codes) {
foreach $offer (@offer_codes) {
foreach $sex ('M', 'F') {
$sth->execute("$offer", "$coll", "$sex")
or die $DBI::errstr;
$sex{$offer} = $sth->fetchrow_array;
$sex{$offer} = ($sex{$offer}) ? "$sex{$offer}" : 0;
print "$sex{$offer}\n";
}
print "M = $M{$offer}, F = $F{$offer}\n";
$T{$offer} = $M{$offer} + $F{$offer};
}
$total = 0;
foreach $offer (@offer_codes) {
$total = $total + $M{$offer};
}
$M_total = $total;
$total = 0;
foreach $offer (@offer_codes) {
$total = $total + $F{$offer};
}
$F_total = $total;
$T_total = $M_total + $F_total;
write REPORT;
}
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phil R Lawrence phone: 610-758-3051
Programmer / Analyst e-mail: prl2@lehigh.edu
194 Lehigh University Computing Center
E.W. Fairchild - Martindale, Bldg. 8B
Bethlehem, PA 18018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Tue, 24 Mar 1998 21:05:57 GMT
From: "Jere C. Julian" <julianje@iname.com>
Subject: Help: Still have AS400 Perl Savf Install Problems.
Message-Id: <35181FCC.59621850@iname.com>
I'm on a RISC box but only V3R6 B/C of an old 400 at one of our sites & comm
problems.
Thus when trying to restore the savfiles I get:
Message ID . . . . . . : CPF3743 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 03/24/98 Time sent . . . . . . : 11:28:22
Message . . . . : File cannot be restored, displayed, or listed.
Cause . . . . . : The file was saved from a more recent release of the
operating system.
Recovery . . . : Do one of the following:
-- Display or list the media on a more recent release of the operating
system.
-- Perform the save operation again with a more recent release of the
operating system specifying the correct value on the target release (TGTRLS)
parameter of the save command and try the request again.
...when I try to restore any of the three (pgm, risc, src) versions. I don't
have
ILE/C so, really, src is useless. So, what else can I do?
Thanks,
-Jere
--
+----------------------------------------------------------------------+
| Jere C Julian PO Box 100, 166 Teague Town Rd. 704-495-2304 |
| Network Administrator Hickory, NC 28601 Fax: 704-495-2260 |
| LADD Upholstery Group: Barclay-Clayton Marcus-Pennsylvania House |
| mailto:julianje@iname.com http://www.laddfurniture.com/ |
+----------------------------------------------------------------------+
------------------------------
Date: Tue, 24 Mar 1998 20:59:25 -0800
From: Jan Krynicky <jkry3025@comenius.ms.mff.cuni.cz>
Subject: Re: How to attach files with Sendmail.
Message-Id: <35188F2D.7051@comenius.ms.mff.cuni.cz>
jglopez@javercol.javeriana.edu.co wrote:
>
> Hi everybody, I am trying to attach a file to a E-mail message sent with send
> mail directly from a script but I don't know how, do you know how, please help
> me.
>
> Thank you.
>
> JG.
Either print correct headers, encode the files as necessary
and pipe them to sendmail or go get the Mail::Sender module.
http://www.chipnet.cz/depot/perl.htm
Jenda
BTW: I wonder why do I have to advertise it all by myself ;-)
------------------------------
Date: Tue, 24 Mar 1998 16:27:39 -0600
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Interpolating into a variable? How to?
Message-Id: <3518335B.B7AA81EC@mindspring.com>
For example:
$planet = 'World';
$greeting = <STDIN>; # $nice now is 'hello $planet/n'
How to do:
$greeting = interpolate($greeting);
and end up with 'Hello World'?
I've seen a solution involving sprintf, which seems to work fine. Is
there a simpler or more recommended way? Haven't seen it in the docs.
------------------------------
Date: 24 Mar 1998 19:04:21 GMT
From: mmhankin@ouray.cudenver.edu (MICHELLE MARIE HANKINS)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6f903l$9g8$2@news.cudenver.edu>
John Moreno (phenix@interpath.com) wrote:
: Mark Stackhouse <stackhou@execpc.com> wrote:
: Well, as any number of people are bound to tell you - this is the
: problem. You either need to BECOME a programmer or you need to tell
: your bosses that they MUST hire one to get the job done.
: You don't have to become a expert programmer, or the worlds best, but
: you do need to become one.
We know this. And I appreciate your understanding of the situation.
Ever tried speaking to a marketing SVP for more than 10 minutes about
what you do for a living, or why you need to buy more disks? Or why
the software development is delayed?
To demonstrate:
Have someone plug ears, play ska music lougly, and scream LA LA LA LA!
Have someone plug their ears, play loud ska music and shout:
LA LA LA LA LA
Now, explain the finer points of the chemical reactions that happen inside
a massive star about to go supernova.
--
Michelle Hankins,
realemail: michelle_hankins@polk.com
playemail: mmhankin@ouray.cudenver.edu
All hardware sucks. All software sucks.
------------------------------
Date: Tue, 24 Mar 1998 15:12:04 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <fl_aggie-2403981512040001@aggie.coaps.fsu.edu>
In article <6f8vpk$9g8$1@news.cudenver.edu>, mmhankin@ouray.cudenver.edu
(MICHELLE MARIE HANKINS) wrote:
+ Forgive us less-enlightened for attempting to check out the ivory tower.
Nothing to forgive there...
+ I'm not a programmer. I'm an artist. But I like utilizing my left brain,
+ and I'm gettin pretty good at it. I may keep this as a day job until I
+ can paint all day.
Then you're becoming a programmer, just like I could become an artist.
The problem with the unwashed mass of newbies is that they don't:
+ I read usenet, I read faq's, I read books, I pop
+ Advil at regular intervals all day while I sit here & scratch my head
+ over why my script doesn't like stuff.
They want a "plug-n-play" solution. It _isn't_ going to happen any time
soon. The closest analogy is this: I go out, buy paint, an easel, some
canvas, and bitch that I can't get what I want on the canvas easily.
Of course not...I have to become an artist, to see things differently.
+ I'm flashing back to Catholic grade school, when I was told there were no
+ altar girls.
There weren't altar girls, but that don't mean you can't learn perl. The
@keys = keys %perl_magic; are at your finger tips. No one -- another
newbie, a journeyman like myself, or a wizard -- can open the perly gates.
Only you, yourself, can. Those who can not understand that are doomed to
fail, no matter how spoonfed, no matter how many FAQs, no matter how much
documentation is/isn't available.
That is the true challenge before the newbie.
James - ah, Attila the Nun...I knew her well... :)
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: 24 Mar 1998 21:34:43 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6f98tj$s4r$1@client2.news.psi.net>
lvirden@cas.org (lvirden@cas.org) wrote on MDCLXVI September MCMXCIII in
<URL: news:6f8v0f$gbd$1@srv38s4u.cas.org>:
++
++ According to I R A Aggie <fl_aggie@thepentagon.com>:
++ :+ Certainly Perl's module concept is good first steps towards this type of
++ :+ user. But if someone has to get compilers, books, pages of FAQs,
++ :+ man pages, internet connections and web browsers (to search online
++ :+ archives and web pages) and seemingly then to learn to program in one
++ :+ language and THEN to learn perl, before being able in many cases to ask
++ :+ for help would seem to be a pretty steep intro curve for the appliance
++ :+ user.
++ :
++ :Do appliance users in the Real World go to Radio Shack, buy components,
++ :and put together a 4 head VHS tape recorder?
++ :
++ :No. Why should they expect to be able to walk in, slap together a
++ :couple of subroutines and a main program, and a functioning CGI script?
++ :These are the same people who complain that setting the said VCR's
++ :clock is hard. Do you want them modifying CGI scripts and putting
++ :them on YOUR server?
++
++ The fun of analogies can be drawn out to excruciating detail, with
++ participants claiming one's analogies don't fit. My next round of
++ analogy might go:
++
++
++ What many do as appliance users is go to Radio Shack and buy the tape
++ recorder and some tapes, take them home, plug them into the electricity and
++ the antenna or cable, and start watching videos. One day, they want to
++ record a show. So they pop out, buy a blank, put it into the recorder,
++ and press the button marked "record". Bingo - they have their show.
++
++ The internet users we are talking about have bought the tape recorder
++ (their computer) and the tapes (software to connect to their ISP, web
++ browsers, etc.). Now they want to plug them in and use them. And that
++ works for a while. Now they want to record a show (create a web
++ page). So they pop out and buy a blank tape (CGI for dummies or
++ whatever - with CD-ROM containing Perl, etc.) and want to put it into
++ their computer and press record. And the lucky ones may be able to
++ start out that way. Then comes the day they want to record a different
++ channel, or at a time in the near future (customize a CGI script).
++ They should not need to go out and learn about electro-magnetism and
++ the physics of how the VCR and tape interact (coding, debugging, etc.)
++ before they can do that. Most would appreciate the kindness of being able
++ to ask simple questions and get simple direct relatively polite answers.
Very much true. However, this groups is about electro-magnetism and
the pysics of how the VCR and tape interact - it's not about the
buttons on the VCR.
Abigail
--
perl -pwle '$_ .= reverse'
------------------------------
Date: 24 Mar 1998 22:17:18 GMT
From: jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni)
Subject: Is this wise way to do this?
Message-Id: <6f9bde$nfb$3@hiekkalaatikko.cs.hut.fi>
Is there a standard way to find out wheter or not a $scalar is a \reference?
I Think the following could get broken if internal structure changes...
sub isarray($)
{ my ($a)=@_;
return( $a =~ m/^ARRAY\(0x.[\dabcdef]{4,}\)$/ );
}
sub ishash($)
{ my ($a)=@_;
return( $a =~ m/^HASH\(0x.[\dabcdef]{4,}\)$/ );
}
...etc
--
_- Joonas Kekoni OH2MTF I -_
_-internet: jkekoni@cc.hut.fi I DO NOT EAT. -_
_-slowmail: j{mer{ntaival 7a176 I -_
_- 02150Espoo I It is a monitor -_
_- Finland/Europe I -_
------------------------------
Date: 24 Mar 1998 21:05:31 GMT
From: spug@halcyon.com (Seattle PERL Users Group)
Subject: L. Wall in Seattle 3/25 with SPUG
Message-Id: <6f976r$abp$1@brokaw.wa.com>
Keywords: PERL SPUG WALL SEATTLE
Perl Enthusiasts,
Larry Wall (www.ddj.com/ddj/1998/1998_02/lead/lead.htm ;
www.wall.org/~larry/) has agreed to meet with SPUG for an impromptu
Perl talk and Q&A session this Wednesday, 3/25/98. The location will
be the one used for the Seattle UNIX Group Meetings, on Mercer Island
(surf www.seaslug.org for a map), and the starting time will be 7pm.
After the talk, there will be an opportunity to socialize with him in
a more relaxed setting (to be determined).
PARKING NOTE:
Once you get to the building indicated on the map, you'll want to drive
up the ramp into the "reserved parking" area, and park in one of the
spots. Don't hold me accountable if you get towed, but generally we've
had no trouble occupying those spots after business hours.
RSVP:
In order to make appropriate preparations, I'd like to have a rough
idea in advance of the number of people expecting to attend. So if
you're pretty sure you'll be there, please drop us a note saying so
(spug@halcyon.com).
EQUIPMENT PLEA:
Larry would like to show us cool stuff from his laptop. Can somebody
provide an LCD panel, or better yet a portable S/VGA projector, for
this purpose? Please contact us if you are able to help with this
(spug@halcyon.com).
====================================================================
| Tim Maher, Ph.D. Tel/Fax: (206)781-UNIX |
| SPUG Founder Email: spug@halcyon.com |
| Seattle Perl Users Group: http://www.halcyon.com/yumpy/spug |
====================================================================
------------------------------
Date: 24 Mar 1998 19:14:44 GMT
From: mmhankin@ouray.cudenver.edu (MICHELLE MARIE HANKINS)
Subject: Re: Lazy question..
Message-Id: <6f90n4$9g8$3@news.cudenver.edu>
NIALL JAMES SELETZKY (njh4@aber.ac.uk) wrote:
: Hi,
: I need to knock up a quick Perl script for my final year dissertation. I don't want to learn Perl, as I prefer Java script,
: but for the scope of this project, Perl is neccesary.
Boy, I can't wait for the carnage when the "oldies" get to YOU.
--
Michelle Hankins,
realemail: michelle_hankins@polk.com
playemail: mmhankin@ouray.cudenver.edu
All hardware sucks. All software sucks.
------------------------------
Date: Tue, 24 Mar 1998 16:35:20 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl programmers wanted to join our project
Message-Id: <comdog-ya02408000R2403981635200001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6f8tlv$c2m$1@nnrp1.dejanews.com>, krzysztofj@usa.net posted:
>Do not miss this unusual opportunity.
>If so, join our team and help us to make our own SEARCH ENGINE.
>I am not going to hire you but to co-operate with you in order to create our
>own piece work.
another wannabe Wired coverboy without financing or technical skill.
remember, Perl is a valuable skill and if you are using it you
should get paid money; not equity, ownership, or any of the other
false banners of compensation.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: Tue, 24 Mar 1998 14:58:15 -0500
From: Frank Cortez <cortez@tfn.com>
To: "Internet Fusion Ltd." <internetfusion@sympatico.ca>
Subject: Re: Perl/CGI for Apache 1.3b3 for Win95
Message-Id: <35181057.6363@tfn.com>
Internet Fusion Ltd. wrote:
>
> Hello,
>
> Does anyone know the easiest, no mess, no fuss (or the least possible)
> way to install a flavor
> of Perl/CGI on the Apache 1.3b3 Web Server for Win95 ?
I'm personally setting up a similar arrangement on a machine
running NT 4.0, though most of what I'm doing *should* work
on a Win95 machine.
> After I installed it, it did create a CGI directory, which has a BIN
> inside it. I don't think it's active though.
If you've run the install batch file (on a presumably recent
enough version of Perl, that is), you're all set on the Perl
side-- though you need to bind the ".pl" extension to perl
programs (check the Win/NT FAQ at http://www.perl.com for
more info on doing this on your system).
Now you need to configure your server. The configuration docs
provided at Apache's website still apply (though you need to
make sure you set the ExecCGI directive for your cgi-bin
directory-- I didn't see that mentioned at the site); just
open up access.conf, httpd.conf, and srm.conf files and make
the right adjustments. There's some pretty good comments
in these files, furthermore, the docs at Apache's web-site
do a pretty decent job of explaining what the commands in these
files do.
Last but not least, all you perl-scripts HAVE to have the
"sha-bang" line with the full path to your perl.exe at the
top. It should look something like this:
#!D:/perl/bin/perl.exe
Note how all the filenames read by Apache HAVE to use forward
slashes-- this applies in the configuration files, too.
> The instructions regarding Perl on the Apache web site are extremely
> poor.
Again, check www.perl.com-- they have a LOT of FAQs related to
running perl CGI. And as for configuring Apache to run it, just
so you know, *I've* got the 1.3b3 running on Win NT, so it can
be done, even though I knew nothing of how to do it a few short
weeks ago.
Good luck and HTH,
-Frank
P.S. I'm also sending copies of my own *.conf files in another
email.
------------------------------
Date: 24 Mar 1998 20:43:07 GMT
From: "Jonathan Larouche" <Jonathan.larouche@enter-net.com>
Subject: Print Out Image in CGI/PERL
Message-Id: <01bd5764$22b3d980$87e0a8c0@larouchejonatha.lactel.com>
I'm trying to output images from a cgi/perl script:
The Script only output the first Image....
How can I print alla my image side to side....???????
thank, Jonathan Socket Larouche
like this source
###############################################################
#!/bin/perl
$file1="/home//Count/1.gif";
$file2="/home//Count/2.gif";
$file3="/home//Count/3.gif";
$file4="/home//Count/4.gif";
print "Content-type: image/gif\n\n"
open(FILEHANDLE,"<$file1") || die "Cant open FILEHANDLE";
print <FILEHANDLE>;
close(FILEHANDLE);
open(FILEHANDLE,"<$file2") || die "Cant open FILEHANDLE";
print <FILEHANDLE>;
close(FILEHANDLE);
open(FILEHANDLE,"<$file3") || die "Cant open FILEHANDLE";
print <FILEHANDLE>;
close(FILEHANDLE);
open(FILEHANDLE,"<$file4") || die "Cant open FILEHANDLE";
print <FILEHANDLE>;
close(FILEHANDLE);
exit;
#################################################################
------------------------------
Date: Tue, 24 Mar 1998 15:55:39 -0500
From: Aaron Bennett <abennett@stonehill.edu>
To: Jonathan Larouche <Jonathan.larouche@enter-net.com>
Subject: Re: Print Out Image in CGI/PERL
Message-Id: <35181DCB.E9FA424B@stonehill.edu>
Jonathan Larouche wrote:
>
> I'm trying to output images from a cgi/perl script:
>
> The Script only output the first Image....
>
> How can I print alla my image side to side....???????
>
> thank, Jonathan Socket Larouche
>
> like this source
>
> ###############################################################
> #!/bin/perl
> $file1="/home//Count/1.gif";
> $file2="/home//Count/2.gif";
> $file3="/home//Count/3.gif";
> $file4="/home//Count/4.gif";
> print "Content-type: image/gif\n\n"
> open(FILEHANDLE,"<$file1") || die "Cant open FILEHANDLE";
> print <FILEHANDLE>;
> close(FILEHANDLE);
.. snip ..
> exit;
You'll need to go this route:
print "Content-type: text/html \n\n";
print "\<HTML\>"
print "\<TITLE\>Blah blah blah\</TITLE\> \n";
print "\<IMG SRC=\"file1\"\>
print "\<IMG SRC=\"file2\"\>
etc...
print "\</HTML\> \n\n";
I don't think you'll be able to get the images to line up side by side
without HTML.
Also, not germane to your question but still, this is much faster
because you're not opening and reading each image -- let the web server
handle that; it's really built for it.
Regards,
Aaron Bennett
-------------------------
Internet Services Coordinator
Stonehill College
http://www2.stonehill.edu/~abennett
------------------------------
Date: Tue, 24 Mar 1998 15:46:55 -0500
From: Aaron Bennett <abennett@stonehill.edu>
To: Quentin Fennessy <quentin.fennessy@amd.com>
Subject: Re: Strange behavior with NET:Ftp under Cron
Message-Id: <35181BBF.E10A9129@stonehill.edu>
Quentin Fennessy wrote:
>
> I suspect you are running two different perl binaries.
>
> Aaron - are you sure the `perl' that is invoked by cron is
> /usr/local/bin/perl? Are you invoking it with a cron line like
> this:
>
> cron /export/service/www-home/https-www2/bin/registrar.pl
>
> Why do you invoke it like this? With a first line as you described:
>
> #!/usr/local/bin/perl
>
> registrar.pl should run fine if the cron entry looks like this:
>
> /export/service/www-home/https-www2/bin/registrar.pl
>
> PS If you know Joan Shobbrook tell her I said hi!
> --
> Quentin Fennessy AMD, Austin Texas
> Secret hacker rule #11 - hackers read manuals
I added "perl" to the cron entry in an attempt to fix it -- it gave the
same message with the cron entry that you described.
Thanks!
Any more suggestions?
- Aaron Bennett
------------------------------
Date: 24 Mar 1998 20:15:14 GMT
From: Bob Shair (courtesy) <rmshair@delphi.itg.uiuc.edu>
Subject: Re: suid under AIX
Message-Id: <6f948i$5u5$1@vixen.cso.uiuc.edu>
Reisel Nikolaus <ren@adv.magwien.gv.at> wrote:
> I've compiled perl5.004_04 built for aix4.2.0.0 with gcc2.8 - all tests
> ok
> I compiled with support for suid !
> My problem: it doesnot work - no suid
> My test script:
> #!/usr/local/bin/perl
> print "User-ID:";
> $id = `/bin/id`;
> print "$id\n";
> My Output:
> Can't reswap uid and euid.
> What's the problem Please help
Don't know. Don't see it on my AIX 4.2 system (built with IBM compiler)
User-ID:uid=505(bshair) gid=0(system) groups=1(staff)
perl -v says:
This is perl, version 5.003 with EMBED
built under aix at May 8 1997 01:29:07
+ suidperl security patch
> Answers via E-Mail Please !!
nonono!
--
Bob Shair rmshair@delphi.itg.uiuc.edu
Open Systems Specialist Champaign, Illinois
/* Opinions expressed are mine... go get your own! */
------------------------------
Date: Tue, 24 Mar 1998 19:39:04 GMT
From: ender@mythen.ch
Subject: Re: Trouble with GD.pm on Win32 Perl
Message-Id: <35180bd3.7430244@news.unisource.ch>
On Sat, 21 Mar 1998 16:31:50 GMT, mark@webz.com (Mark Schmick) wrote:
>On Sat, 21 Mar 1998 09:44:56 GMT, ender@mythen.ch wrote:
>>I tryed to create a small CGI-Counter script. First i used fly.exe for
>>gif creation. But sometimes I didn't get any picture in the browser.
>>So I searched another solution and found the GD.pm module. But it
>>doesn't work on my NT box.
>>I have NT 4.0 SP3 and Perl for Win32 5.003_07 Build 315.
>>I use GD module 1.18
>
>Sounds like you're using ActiveState's version of Win32 Perl.
>May I suggest a switch to the new "porter's version" of Perl,
>conveniently precompiled for Win32 by Garusamy Sarathy, details
>at http://www.perl.com/latest.html
>ActiveState's version has many known problems with unbundled
>modules, which the porter's version (based on the sources,
>rather than a port) doesn't have (so much). Your problem
>in particular seems to be resolved -- this from the readme:
Yes, you're right! I had ActiveState's version installed but now I use
the version you suggested and it's working fine!
Many thanks for your help!!!!
Josi
------------------------------
Date: Tue, 24 Mar 1998 20:51:43 +0000
From: David Richards <dave@turfpit.demon.co.uk>
Subject: Re: Wanted: Perl for Windows 3.x
Message-Id: <35181CDF.F46C2358@turfpit.demon.co.uk>
Richard
Try any
/CPAN/ports/msdos/LMOLNAR/perl542b.zip.
This version is built using DJGPP (a port of the GNU C/C++ compiler). The
documents say that this port of perl "can use up to 256Mb of virtual
memory" .
David
Brian Sawert wrote:
> On 20 Mar 1998 10:11:01 -0500, charlot@CAM.ORG (Richard Bellavance)
> wrote:
>
> >> Is there a perl version that
> >>can be run on MS-Windows 3.1 or MS-Dos ?
>
> There is a DOS version available, with all the DOS limitations. You
> can run only the tiniest scripts, due to the 640k barrier (There is no
> support for extended or expanded memory).
------------------------------
Date: 24 Mar 1998 17:08:30 -0500
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: Wanted: Perl for Windows 3.x
Message-Id: <6f9asu$1n2@stratus.CAM.ORG>
In article <3518dbfb.64673024@usenet.nau.edu>,
Brian Sawert <bas.nospam@dana.ucc.nau.edu> wrote:
>On 20 Mar 1998 10:11:01 -0500, charlot@CAM.ORG (Richard Bellavance)
>wrote:
>
>>>I am a computer eng student, I want to learn some perl. However
>>>I don't have access to a UNIX box. Is there a perl version that
>>>can be run on MS-Windows 3.1 or MS-Dos ?. I know that there
>>>is a perl flavour for MS-Windows NT but I am not in a position
>>>to have access to a NT machine.
>
I didn't write this ! Careful when deleting attribution lines !
Richard.
--
Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
"All along this path I tread / My heart betrays my weary head
With nothing but my love to save / From the cradle to the grave"
(Eric Clapton, "From the cradle")
------------------------------
Date: Tue, 24 Mar 1998 14:42:03 -0500
From: Jim Michael <jim.michael@gecm.com>
Subject: Re: Why hasn't there been a vote on moderating cplm yet ?
Message-Id: <35180C8B.2454@gecm.com>
Birgitt Funk wrote:
> Why is voting on this a problem and why hasn't it been done ?
A second RFD will be posted, reportedly soon, then some discussion of
that, then... maybe a CFV. Remember discussion of the proposal should be
made in news.groups.
Cheers,
Jim
------------------------------
Date: 24 Mar 1998 20:19:51 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Why hasn't there been a vote on moderating cplm yet ?
Message-Id: <6f94h7$bpi$1@news.orst.edu>
In article <3518164B.24E66EF9@order.booktraders.com>,
Birgitt Funk <birgitt@order.booktraders.com> wrote:
You are discussing this in the wrong group, but hey, why not?
>Why is voting on this a problem
It isn't.
>and why hasn't it been done ?
Because the process wasn't started until 9 March and there was
discussion about the proposal. A second RFD is expected any day now,
which may result in more discussion.
>What is so bad about moderation ?
Generically, that depends on the moderators and the proposed moderation
process. Specifically, as far as I am concerned, the registration
process. There was concern about TPI being able to approve articles,
but that seems to have been worked out.
The proper place to follow the discussion is news.groups.
>It would make the list much
>more helpful and usable, as long as answers are given clearly.
Moderation has nothing to do with how clear the answers will be. The
moderators won't be writing the answers.
>Looking at how much time (and emotions) are spent to straighten
>out one poster, I would say, one should not waste great resources
>(proficient Perl programmers) like this.
As I would point out to anyone, nobody is forcing any "great resources"
to spend their time "straighening out" anyone. They can, as can anyone,
simply ignore questions they do not want to spend their time on.
>Can someone tell me what the main reason is that no vote or
>decision has been made to moderate cplm?
Because the discussion on the proposal isn't over and a CFV hasn't been
issued. By the way, there will be no vote to moderate
comp.lang.perl.misc. There may be a vote to create
comp.lang.perl.moderated.
If you want to understand the process a little more, refer to
<http://cil-www.oce.orst.edu:8080/users.guide>.
------------------------------
Date: 24 Mar 1998 21:25:13 GMT
From: jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni)
Subject: {block} orinted <FILE> descriptors
Message-Id: <6f98bp$nfb$1@hiekkalaatikko.cs.hut.fi>
How can i make a rutine recursive structure so that i can use different
file in diffrent step. I have only found an (ugly?) workaround.
The filedescriptors seem to default global and I can't change it.
I can't declare my <INFILE> it is not the way it goes.
--- this looks horrible workaround, Is there a better way for doing that?---
no strict refs; #can't help it.
main($$)
{ my( $a,$name)=(@_);
$a++;
open ( $a,$name) or die "file not opened error";
print $a "first line ...";
if( something )
{ main ($a,...
}
...
}
my $fh="aa"; #this is a counter
my $name="start";
main($fh,$name);
--
_- Joonas Kekoni OH2MTF I -_
_-internet: jkekoni@cc.hut.fi I DO NOT EAT. -_
_-slowmail: j{mer{ntaival 7a176 I -_
_- 02150Espoo I It is a monitor -_
_- Finland/Europe I -_
------------------------------
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 2174
**************************************