[8333] in Perl-Users-Digest
Perl-Users Digest, Issue: 1950 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 22 02:08:54 1998
Date: Sat, 21 Feb 98 23:00:24 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 21 Feb 1998 Volume: 8 Number: 1950
Today's topics:
Re: An easy question or two <webmaster@fccj.cc.fl.us>
Re: Attatching files with sendmail <webmaster@fccj.cc.fl.us>
Re: Avoid direct call to perl <webmaster@fccj.cc.fl.us>
Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et <webmaster@fccj.cc.fl.us>
Re: Cacheing and Back Button question. <webmaster@fccj.cc.fl.us>
Re: Content-type Question <rcd@kiwi.net>
Re: Generic Config-file maintenance <webmaster@fccj.cc.fl.us>
help with global variables needed (Terry von Gease)
Re: help with global variables needed <zamboni@cs.purdue.edu>
Help: Warning in string to number conversion. <zamboni@cs.purdue.edu>
Re: Installation-Problem on NT 4.0 <corky@ma.ultranet.com>
Know Win32 and GD? Get a Free T-Shirt (N.A.F. McNelly)
Re: Looking for Perl code to extract comments/tags from <webmaster@fccj.cc.fl.us>
Re: lwp-mirror: at vs cron <webmaster@fccj.cc.fl.us>
Re: My first perl program, yippee! <webmaster@fccj.cc.fl.us>
Re: My first perl program, yippee! <webmaster@fccj.cc.fl.us>
Re: Need CGI programmer, search <webmaster@fccj.cc.fl.us>
Off-topic (Sorry, but I need your help) <allie@icct.net>
Re: PERL CGI AUTHENTICATION <webmaster@fccj.cc.fl.us>
Re: Pipe wierdness <webmaster@fccj.cc.fl.us>
Re: printing problem <webmaster@fccj.cc.fl.us>
Re: Regexp question (Abigail)
Re: Send Encrypt Email <webmaster@fccj.cc.fl.us>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 21 Feb 1998 21:42:13 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: An easy question or two
Message-Id: <34EF9085.68FC47C4@fccj.cc.fl.us>
You really should start picking better SUBJECT lines...
Please read this information on how to choose a good subject for a post:
<URL:http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post>
Amy Hartman wrote:
> Sorry for the newbie questions; I'm still learning all the intricacies
> of Perl.
>
> 1) Is there any way for Perl to modify an already existing form that is
> being displayed on a web browser? (without rewriting the whole page)
> ie. a form field says "John" and you want Perl to change it to "Jane"
> without just a complete rewrite of the file.
>
See my answer to other similar questions you have posted...
> 2) Is there any way for Perl to pass variables to Javascript? On the
> same token, how does Perl set or change cookies?
See CGI.pm :-) My answers do not change because ALL of yourquestions
related to the same things...
>
>
> Thanx for all the help in advance
> Amy
HTH,
Bill
------------------------------
Date: Sat, 21 Feb 1998 21:44:32 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Attatching files with sendmail
Message-Id: <34EF910F.26FC9DD2@fccj.cc.fl.us>
Yes, I have answered similar questions with complete source;
in Perl even...
So a search of http://www.dejanews.com should give plenty
of answers :-)
HTH,
Bill
Robert Barker wrote:
> Can u attatch files with sendmail???
>
> I want the user to select a file a html pulldown menu, fill in their
> email address and have the
> file sent back to them.
>
> Must be possible (and probably quite simple).
>
> Thanks
>
> --
> Robert Barker
> System's Development Manager
> Net7 Limited
> http://www.net7.co.uk/
>
> Tel: +44 (0)1924 444007
> Fax: +44 (0)1924 445507
>
> dataTRAK - Net7's Java Meta-Search Engine:
> http://datatrak.net7.co.uk
------------------------------
Date: Sat, 21 Feb 1998 22:34:20 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Robert Yacobucci <rgy@scscompany.com>
Subject: Re: Avoid direct call to perl
Message-Id: <34EF9CBC.F675C6E9@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
Yes, you are heading in the right direction...
Also, see CGI.pm for more goodies...
Bill
Robert Yacobucci wrote:
> I would like to know if my cgi script is begin called from within my
> web-page, or the user has directly typed it in the browser.
>
> I have a cgi script that goes and gets a page and displays it...but I only
> want the action to occur if the calls was from within one of my own
> web-pages.
>
> I currently check the $ENV{'HTTP_REFERER'}) variable which seems to work.
> Is this the proper thing to do? Is there a better way to do this with perl?
>
> Please email me answer and thank you for your help.
>
> Bob
------------------------------
Date: Sat, 21 Feb 1998 21:33:01 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <34EF8E5C.AE524F1E@fccj.cc.fl.us>
Has my Vote!
Bill
David Hall wrote:
> OTOH, if you pronounce it "Read the FAQ 'n' Manual" (especially if you're
> from Boston), you can both be more correct _and_ more informative <BG>
<Other stuff snipped...>
------------------------------
Date: Sat, 21 Feb 1998 22:42:28 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Cacheing and Back Button question.
Message-Id: <34EF9EA3.6569CFD9@fccj.cc.fl.us>
[courtesy cc of this posting WAS NOT sent to cited author via email]
You're basically stuck. I do not know of a way to accomplish what
you are trying to do...
I would suggest you keep track of it internally to the Perl code itself
and
stay away from cookies; or research the CGI.pm module closely.
It will give you hints on how to approximate what you want...
HTH,
Bill
Remove NOSPAM to reply wrote:
> Hello. I've been trying without luck to figure out how to prevent the
> user from using the back button from a certain page.
>
> My problem is that I have form that is used for editing the
> state of something. A perl script handles the POST method
> and generates a new version of the form with each interaction.
> If I allow the user to use the back button, then they will be
> able to step back to a previous version of the form, which
> will contain out of date state information.
>
> I have tried using Pragma: no-cache, and also using the
> Expired header with both "0" and an old date as
> Content. They only work intermittently in Netscape 4.04.
>
> I would like to write a Java applet to handle this
> situation, but unfortunately the client doesn't like
> Java. Any suggestions would be appreciated.
>
> Thank you,
> Lee Nelson
------------------------------
Date: Sat, 21 Feb 1998 19:44:22 -0800
From: Craig <rcd@kiwi.net>
Subject: Re: Content-type Question
Message-Id: <34EF9F16.4CA10F7F@kiwi.net>
text/html
sorry.
Craig wrote:
> If you want the content to be printed in HTML, then use
> print "Content-type: text/htm\n\n";
> This works best for me.
>
> Bill White wrote:
>
> > I'm reading a good book by Selena Sol and others, and trying to learn Perl,
> > but something doesn't seem to be right and I was wondering if it's because
> > I'm testing the scripts out with Microsoft's Personal Web Server, instead of
> > a unix-type server, or even IIS. Here it is:
> >
> > On all the book's scripts there's this:
> > --------------------------------------------------------------
> >
> > # Print the header required for all CGI scripts that output dynamic text
> > data
> >
> > print "Content-type: text/plain\n\n";
> > --------------------------------------------------------------------
> >
> > If I include the command, the resulting html page always displays the text
> >
> > Content-type:text/plain
> >
> > And, if I delete the command from the script, the script still apears to
> > work perfectly, even though the comment above states "header 'required' for
> > all CGI scripts that output dynamic text data". So, I'm getting the
> > impression that it's not really required.
> >
> > Thanks, any help will be appreciated.
> >
> > Bill White
------------------------------
Date: Sat, 21 Feb 1998 22:08:37 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Generic Config-file maintenance
Message-Id: <34EF96B4.F7EB664F@fccj.cc.fl.us>
Well, hope your Perl Hacker knew enough to 'check' all the return codes...
Bill
PS - Are these non-programmers fiddling with the original code, or
just the configs themselves?
Roy Culley wrote:
> In article <6bapde$sa8$3@csnews.cs.colorado.edu>,
> Tom Christiansen <tchrist@mox.perl.com> writes:
> > [courtesy cc of this posting sent to cited author via email]
> >
> > Just make the config file straight perl! Anything else is dubious at best.
> >
> > --tom
>
> Thats ok for perl hackers but what if the config file is maintained
> by non-programmers?
>
> --
> Roy G. Culley Tel: +41 31 342 56 62
> Dept. IS-B-53 Fax: +41 31 342 04 62
> Swisscom Email: Roy.Culley@acm.org
> Key fingerprint = 6B AD 68 79 30 0B C0 5F 16 BC 90 57 35 E9 FC 40
------------------------------
Date: 20 Feb 1998 02:34:53 GMT
From: twv@rose.hp.com (Terry von Gease)
Subject: help with global variables needed
Message-Id: <6ciq4d$nee$1@rosenews.rose.hp.com>
Could someone give me the short jargonless see-spot-jump course
in using global variables?
Assume a module 'mymod.pm' that contains...
use strict;
my $var1;
my $var2;
my $gvar1;
...
assume a perl script 'mymain.pl' that contain
use strict;
use mymod;
my $mvar1;
my $mvar2;
my $gmvar1;
...
Now mymod.pm wants to make its variable $gvar1 available to
whatever module might do a 'use mymod'.
Conversely mymain.pl wants to make its variable $gmvar1 available
to any module that it might specify with a 'use'.
Moreover, it's possible to invoke mymain.pl with a run-time variable,
something like 'mymain.pl -rvar', and it wants also to make $rvar
available to any module that it might specify with a 'use'.
To sum up, I want $gvar1, $gmvar1, and $rvar to be able to be diddled
anywhere, including in any subroutine, in both mymain.pl and mymod.pm.
I've played some with putting $gvar1 in @EXPORT and that worked as
long as I didn't use 'strict' and merely declared $gvar1 without the
'my'. When I said 'use strict' perl barfed on the my-less declaration
so I said 'my $gvar1' and then said 'use vars($gvar1)'. This seems
to work. Do I still have to include $gvar1 in @EXPORT?
But I haven't got a clue how to set up $gmvar1 in mymain.pl so
that it's global to everyone.
I'd really appreciate some help here. I've read the pertinent parts of
the camel book, the Advanced Perl Programming book, and here and
there on the web. I'm sure it will all make perfect sense to me someday
but right now it appears very much like conventions from another
world. Help.
--
Terry A proper signature should sum up one's entire
philosophy and, at the same time, cause anyone who
reads it to question everything in which they
believe.
------------------------------
Date: 21 Feb 1998 23:49:43 -0500
From: Diego Zamboni <zamboni@cs.purdue.edu>
To: twv@rose.hp.com (Terry von Gease)
Subject: Re: help with global variables needed
Message-Id: <fwbtw0nt08.fsf@narnia.cs.purdue.edu>
twv@rose.hp.com (Terry von Gease) writes:
> But I haven't got a clue how to set up $gmvar1 in mymain.pl so
> that it's global to everyone.
I don't think that is directly possible. However, you could use the result
from the "caller" function to fully qualify the variable you want to
access. This is, if mymod.pm contains a function myfunc that wants to
access the global variable $gmvar1 in the calling package, you could
do something like this:
sub myfunc {
my $callerpackage=(caller)[0];
my $variable="$callerpackage::gmvar1";
$$variable=3;
}
caller returns (package, subroutine, linenumber) information for the
caller, so by taking element 0 you get the package name. Then you use
a symbolic reference to directly access the variable gmvar1 in that
package.
It's convoluted, but it should work.
--Diego
------------------------------
Date: 21 Feb 1998 23:54:16 -0500
From: Diego Zamboni <zamboni@cs.purdue.edu>
Subject: Help: Warning in string to number conversion.
Message-Id: <fw90r4nssn.fsf@narnia.cs.purdue.edu>
Hi,
I'm having a little trouble with string-to-number conversion. If I use the
-w switch, Perl complains every time I want to use a string in a numeric
context. The following code shows this:
$fh="blabla";
if(1==$fh) { print "One\n"; }
If you run this with perl -w, you get `Argument "blabla" isn't numeric
in eq at testNum.pl line 4' or something to that effect.
However, I am using this in a subroutine where I am aware that the
value could be numeric or string, and I want to be able to handle
both.
I know, that's what -w is for. But is there a way to force Perl to
take $fh as a number without complaining? I have tried all of the
following:
($fh+0)=1 ("...isn't numeric in add at...")
int($fh)=1 ("...isn't numeric in int at...")
$fh==1 ("...isn't numeric in eq at...")
Thanks for any ideas.
Cheers,
--Diego
------------------------------
Date: Sat, 21 Feb 1998 21:42:59 -0500
From: Bob Trieger <corky@ma.ultranet.com>
To: Peter Wermelinger <p.wermelinger@bluewin.ch>
Subject: Re: Installation-Problem on NT 4.0
Message-Id: <34EF90B3.2AF1@ma.ultranet.com>
Follow-ups: comp.infosystems.www.servers.ms-windows
Peter Wermelinger wrote:
>
> New in the field of Perl I can't get the Perl-Installation run on my NT
> 4.0 server (Back Office Small Business Server). I always get the message
> "HTTP/1.0 501 Not supported". The perl-version was downlaod from
> "www.ActiveState.com" Perl for Win32 Build 315 and the installation went
> automatic.
You are getting a web-server error message not a perl error message.
Does perl execute from a command line ok? If so, perl is probably
installed ok and you need to configure your web server to recognize
perl.
HTH
Bob Trieger
corky@ultranet.com
------------------------------
Date: Sat, 21 Feb 1998 22:19:41 -0500
From: nmcnelly@bu.edu (N.A.F. McNelly)
Subject: Know Win32 and GD? Get a Free T-Shirt
Message-Id: <nmcnelly-2102982219410001@ppp-95-3.bu.edu>
Many thanks to those of you who have offered advice in the past.
I've reached the end of my usefulness. The situation is this:
I wrote a perl script that worked just fine on Unix - all that
was required was some number crunching and gif combining via GD.pm
It also runs just fine under MacPerl. This was intended to produce
on-the-fly T-shirts. But my friend, who'll be doing the actual
production is (1) running Windows 95 and (2) knows no perl
whatsoever. This hasn't mattered with the number-crunching bit,
but GD makes the script die without fail (at different steps).
I've written a short test script that has been modified many times
based on advice from Dave Roth's info and the kind folks here.
But it won't fly, and the difficulty is that I have no access to
a machine with Win32 perl and GD.pm installed, and without that
I can't amke it fail at my end. And if you can't make it fail, you
can't fix it.
So, does anyone out there (1) have such a setup and (2) have a
willingness to get a very short test script to run? We'll offer
a T-shirt with the date of your choice written in handsome Mayan
hieroglyphics.
.................................................................
Nancy McNelly
http://www.halfmoon.org/
Rabbit in the Moon: Mayan Hieroglyphics and Architecture
------------------------------
Date: Sat, 21 Feb 1998 22:11:37 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: "William D. Sears" <BillSear@vnd.tek.com>
Subject: Re: Looking for Perl code to extract comments/tags from a C source file
Message-Id: <34EF9769.41DA571@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
You're probably gonna want to 'substr' each line,
just to be sure...
HTH,
Bill
William D. Sears wrote:
> I am looking for a Perl program which will extract comments with embedded
> tags from C source code. The purpose of this is to generate HTML files
> which contain documentation for a C language API. I have looked at Perceps
> and it does something similar to what I'm trying to do, but it's too much.
> I'm looking for something much simpler. Basically, I just want to recognize
> tags (like name, param, returns, etc.) and extract the information
> associated with them so that I can feed this to a template to generate HTML.
> I don't need any language parsing capabilities like what Perceps or Javadoc
> do. I am figuring that there is code out there somewhere, does anyone have
> anything that will do this?
>
> Bill Sears
------------------------------
Date: Sat, 21 Feb 1998 22:05:40 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Paul Joslin <paul.joslin@sdrc.com>
Subject: Re: lwp-mirror: at vs cron
Message-Id: <34EF9604.CA336513@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
If 'cron' is dying because it wants input - I would look at
where the 'input' is supposed to come from...
Other than that, are there any other messages?
?
Bill
Paul Joslin wrote:
> Apologies in advance if there isn't enough perl in this to interest you...
>
> I have a shell script which uses lwp-mirror to fetch a page, and then process
> it. The script runs correctly from the command line, and from at or batch,
> but not from cron. The error message is "lwp-mirror: 501 Not Implemented".
> Env problem, right? Especially since I'm behind a firewall and have to
> specify proxies via variables...
>
> If I save the environment from the command line (env | perl -pe
> 's/^(.*)=(.*)$/$1="$2"/gio' > FILE), and dot the file into the script, it
> still doesn't work from cron.
>
> What am I overlooking?
> --
> Paul R. Joslin paul.joslin@sdrc.com +1 513 576 2012
> Paul R. Joslin paul.joslin@sdrc.com +1 513 576 2012
> What about WRITING it first and rationalizing it afterwards? :-)
> --Larry Wall in <8162@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Sat, 21 Feb 1998 21:25:35 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: My first perl program, yippee!
Message-Id: <34EF8C9E.930B770D@fccj.cc.fl.us>
Honestly Shane, how hard does Cut-N-Paste
Source Code
have to be?
Bill
PS - Yes, I have a Base64 decoder, in Perl, but why?
Not to decode a newsgroup which is SUPPOSED to be in TEXT...
Plastic Nuclear Ferret wrote:
> Jonathan Stowe (Gellyfish@btinternet.com) wrote:
> :
> : /J\
> : without facility to do anything with base64 encoded postings
>
> ever think of writing a perl script for it? 8^)
>
> later-
>
> shane
> --
> #############################################################################
> # Shane Knapp # donut@bayarea.net # shane@investools.com #
> # "I'd like to be Superman, but you're standing on my cape...." #
> # http://www.bayarea.net/~donut #
> #############################################################################
------------------------------
Date: Sat, 21 Feb 1998 21:21:51 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: My first perl program, yippee!
Message-Id: <34EF8BBF.631A070E@fccj.cc.fl.us>
Stop! You're killing me!
<ROTFLOL>
Jonathan Feinberg wrote:
> matt.pryor@dial.pipex.com said...
> : This is a multi-part message in MIME format.
>
> No! *thwap* Bad!
>
> : Anyone who wants to use this is
> : more than welcome, of course :-)
> :
> : Matt
>
> *The* Matt?
>
> Well, on to your code:
>
> : IyFjOlxwZXJsXGJpblxwZXJsLmV4ZQ0KDQppZiAoISRFTlZ7UVVFUllfU1RSSU5HfSkgeyAN
>
> You really should remember -w.
>
> : CgkkbmFtZT08U1RESU4+Ow0KCWNob21wICRuYW1lOw0KCSRuYW1lID1+IHMvIC8lMjAvZzsN
> : CgkkRU5We1FVRVJZX1NUUklOR309ImRhdGFiYXNlPWRhdGFiYXNlLnR4dCZmaWVsZHM9NyZm
>
> Good, you're using modules, but what about "use strict;"?
>
> : aWVsZDE9JHtuYW1lfSZmaWVsZDQ9c3Vzc2V4JnNlbnM9MiZkaXNwbD0xLDMsNCI7DQoJJEVO
> : VntSRVFVRVNUX01FVEhPRH09IkdFVCI7DQp9DQoNCg0KJHdlYm1hc3RlciA9ICJtYXR0LnBy
> : eW9yXEBkaWFsLnBpcGV4LmNvbSI7DQpwcmludCAiQ29udGVudC10eXBlOiB0ZXh0L2h0bWwi
>
> Why don't you just use "printf?"
>
> : LCJcblxuIjsNCg0KDQoNCiZjaGVja3ZhcmlhYmxlcyAoKTsNCiZwYXJzZV9kYXRhZmlsZSAo
>
> If you're going to autoflush your sockets, remember to spit out "\015\012"
> after all output.
>
> : KTsNCg0KcHJpbnQgPDxFbmRfT2ZfSGVhZGVyOw0KPEhUTUw+DQo8SEVBRD48VElUTEU+U2Vh
> : cmNoIFJlc3VsdHM8L1RJVExFPjwvSEVBRD4NCjxCT0RZIEJHQ09MT1I9I0ZGRkZGRj4NCjxG
>
> Ha, ha. Clever hack!
>
> All in all, a tremendous first effort.
>
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Sat, 21 Feb 1998 22:53:54 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Need CGI programmer, search
Message-Id: <34EFA152.A87C7C8D@fccj.cc.fl.us>
$600/day... ($120 per day per posting...)
Bill
drnkl@ibm.net wrote:
> I am running a free ads site http://www.greekads.com
> The search is in English and in Greek. The FP98 bot is not doing a good job.
> My programmers are not doing a good job either. Can someone take a look,
> offer recommendations and a quotation (your fees) please. This is part of a
> very large job, 30 web sites times n.
> As I said, do not bother to reply unless you know your job, please.Thanks,
> Dr. Nichols
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sun, 22 Feb 1998 04:45:11 GMT
From: Allie <allie@icct.net>
Subject: Off-topic (Sorry, but I need your help)
Message-Id: <34EFADCE.42270833@icct.net>
I know this off-topic and I apologize, but I've been
really impressed with the knowledge and helpfulness of
the people in this NG and I thought you might be able
to help.
I'm new to the networking department in our company. My
first project is to put together a packet for a
prospective client running Groupwise who is interested
in the benefits of Exchange. Our company really wants
this client - if we hook him on networking we can
probably sell him a lot of our other services. Now I'm
still learning the networking ropes so my knowledge
here is limited. But I'd be really interested in
learning anyone's experiences and opinions with these
products. Obviously, if he doesn't switch, we don't get
his networking business so any information that can
help me sell him Exchange is good. But I don't want to
be biased, either. I'd rather impress him with our
honest opinions on which product best serves his needs.
Unfortunately, I can't really go into detail at this
point about his needs, so any pro/con information about
these products and their differences would be great.
It's my understanding that Novell sales are drastically
dropping and I've heard that MS Networking products are
the "wave of the future". True? Any feedback
appreciated. And again, I apologize for getting so
off-topic (and at such great length.....) but I really
think you guys are knowledgeable and very good about
helping beginners. And it seems like there's a lot of
networking gurus here. Anyway, thanks in advance, allie
------------------------------
Date: Sat, 21 Feb 1998 22:21:17 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Ernest Axelbank <ernie@law.harvard.edu>
Subject: Re: PERL CGI AUTHENTICATION
Message-Id: <34EF99AD.A8E35A98@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
I have code which will do what you really are trying to do, it is
free for EDU Institutions so long as you -
1. Agree not to redistribute it,
2. Figure out how to install it, and support it yourself,
Otherwise I would be happy to install it, customize it, and support it
for a fee...
HTH,
Bill
PS - The code was designed around Human Resources,
but it does the security, et al, like you are trying...
Ernest Axelbank wrote:
> We've written some CGI scripts and plopped them in a sub-dir of
> cgi-bin.
> These cgi's are to be restricted to a group of about 12 individuals at
> the site where we're working. I would like the users to be prompted
> for
> authentication every time a cgi is called (without having to exit
> netscape).
>
> Currently, once a user authenticates, they never have to
> re-authenticate. I've tried TimeOuts and KeepAlives in 'httpd.conf'.
>
> On a related note:
> Is it possible to set a perl environment varible like:
> $ENV{'REMOTE_USER'}="NULL";
> I was thinking this might cause the user to have to re-authenticate.
>
> Thanks for any help,
>
> -Ernie & Mike.
> ITS Systems Group
> Harvard Law School
------------------------------
Date: Sat, 21 Feb 1998 22:16:57 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: irishman@technologist.com
Subject: Re: Pipe wierdness
Message-Id: <34EF98A9.1BD75FFE@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
You would really want to consult -
LWP and CGI.pm Both available via CPAN at http://www.perl.com
Oh and look at http://www.boutell.com See PerlMUD for an example of
how servers work; plus Tom Christiansen posted a good example of
a 'servoclient' type thing (w/source) -- Search in DejaNews...
HTH,
Bill
PS - My personal opinion, get away from cgi-lib.pl...
irishman@technologist.com wrote:
> I'm not a newby but I'm having a really wierd and stupid problem that is
> driving me nuts. I'm trying to write a very basic web server which will only
> execute cgi-bin scripts, not serve pages. To make things even more basic, I am
> only trying to service "GET" requests - if I ever figure that out, I will move
> on to "POST" requests which will be trickier since I need to use bidirectional
> pipes. Anyway I've written a very simple test script based on the absolutely
> bog-standard cgi-lib.pl package that everyone uses:
>
<Extraneous Stuff - snip...>
------------------------------
Date: Sat, 21 Feb 1998 21:53:59 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Sergio Brandano <serbr@tin.it>
Subject: Re: printing problem
Message-Id: <34EF9346.113480A8@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
Hi :-) I understand where you are coming from as I have had to create
Perl CGI scripts which talk to a PCL-5 HP LaserJet...
Please understand that CGI/Postscript, et al is off topic here because
this group was set aside to discuss issues revolving around concrete
language specific items like -
Why does $setSub = \&Subroutine if $erc; work like it does?
However, we are not without sympathy with regard to problems
you are having. I for one would interested in this topic, so long as
it is carried out in 'comp.infosystems.www.authoring.cgi
:-) See you there,
Bill
PS - A hint in the right direction would be -
The postscript interface is no differnt than the
Browser interface. IE, you have to
output session/device specific code; so
you output Postscript to your system printer;
instead of the Browser... See?
------------------------------
Date: 22 Feb 1998 02:43:52 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Regexp question
Message-Id: <6co3d8$7ou$1@client2.news.psi.net>
Spencer Lu (fake.address@no.spam.com) wrote on 1636 September 1993 in
<URL: news:hIjs9p2YyqR0-pn2-pQkzgcYEkISZ@207-172-113-134.s134.tnt5.ann.erols.com>:
++ Hi,
++
++ I'm writing a perl script, and one of the things it does is remove
++ all trailing spaces from all lines of a text file. My initial attempt
++ at this failed, and I'm not sure why. Here is the relevant code:
++
++ while ($line = <FILE>) {
++ $line =~ s/^(.*) *\n/$1\n/;
++ $filestring = $filestring . $line;
++ }
++
++ I recently discovered that I could just use:
++ $line =~ s/ *\n/\n/;
++ which is simpler and works, but I am curious
++ as to why my initial attempt failed.
It didn't fail, it did exactly what you told it to do.
Let's break your regex down into parts, using /x for more readability:
s/^(.*) # Match as many non newline characters as you can.
\ * # Followed by zero or more spaces.
\n # Followed by a new line.
/$1\n/x # And replace it with the non newline characters.
But a space is a non newline character! So, if your line is
"Foo bar \n"
the $1 equals "Foo bar ". You could have solved it by using a
non greedy modifier:
s/^(.*?) *\n/$1\n/;
But your recent discovery is more efficient.
Abigail
--
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: Sat, 21 Feb 1998 21:38:35 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Lars FORNELL <lars.fornell@limelab.com>
Subject: Re: Send Encrypt Email
Message-Id: <34EF8FAA.4068CBC@fccj.cc.fl.us>
[Courtsey CC'ed mailed and Posted...]
I would recommand the following -
http://www.dcs.ex.ac.uk/~aba/rsa/
HTH,
Bill
Lars FORNELL wrote:
> How do I send encrypt email with Perl ?
>
> I have seen a lot of Perl applications using PGP to send
> encrypt emails but I want to be able to send encrypt
> email with the RSA standard so that for example the
> Netscape Email program can receive it.
>
> /Lars FORNELL
>
> --
> lars.fornell@limelab.com
> Limelab web development
> http://www.limelab.com
------------------------------
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 1950
**************************************