[15939] in Perl-Users-Digest
Perl-Users Digest, Issue: 3352 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 14 09:05:29 2000
Date: Wed, 14 Jun 2000 06:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <960987915-v9-i3352@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 14 Jun 2000 Volume: 9 Number: 3352
Today's topics:
Re: ANSI Perl: No Way !!! <pdcawley@bofh.org.uk>
Re: ANSI Perl: No Way !!! <elaine@chaos.wustl.edu>
Can XS or SWIG interface a perl script to Java subrouti gdpusch@NO.xnet.SPAM.com
Re: Can XS or SWIG interface a perl script to Java subr <matt@sergeant.org>
Re: Easy CGI question <flavell@mail.cern.ch>
Re: evaluating expressions <uri@sysarch.com>
Re: Extract filename from path? <flavell@mail.cern.ch>
Gif creation on the fly phool@my-deja.com
Re: help - redefined subroutine warning <bill.kemp@wire2.com>
Re: Help with strings <godzilla@stomp.stomp.tokyo>
Re: Help with strings (Bart Lateur)
Re: How to check browser for Javascript enable? <bill.kemp@wire2.com>
Re: How to check browser for Javascript enable? <flavell@mail.cern.ch>
Re: How to use LWP::UserAgent to get a zip file? (Eric Bohlman)
Re: how to write on a file? (Eric Bohlman)
Re: Installing active perl (Clinton A. Pierce)
Login and passwords <vivekvp@spliced.com>
Multi language messages <you.will.always.find.him.in.the.kitchen@parties>
Re: Multi language messages <flavell@mail.cern.ch>
never mind !! <danielxx@bart.nl>
Re: never mind !! (Bart Lateur)
Opening a file for realtime monitoring peterpchurch@my-deja.com
Re: Opening a file for realtime monitoring <peckert@epicrealm.com>
Re: Perl and .htaccess <flavell@mail.cern.ch>
Re: Perl and MM Flash <ldobson@enterprise.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Jun 2000 09:24:51 +0100
From: Piers Cawley <pdcawley@bofh.org.uk>
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <m1pupk6564.fsf@rt158.private.realtime.co.uk>
"Godzilla!" <godzilla@stomp.stomp.tokyo> writes:
> Drew Simonis wrote:
>
> > "Godzilla!" wrote:
>
> (snipped trolling, harassment, personal insults)
^^^^^^^^
You keep using that word, I do not think it means what you think.
--
Piers
------------------------------
Date: Wed, 14 Jun 2000 12:35:31 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <B56CF44F.621F%elaine@chaos.wustl.edu>
in article 394715B3.A480DA2@attglobal.net, Drew Simonis at
care227@attglobal.net quoth:
> I keep having the sneaking suspicion that there is some NG somewhere
> full of folks laughing there asses off. Kinda like when the folks
> from alt.discordia go trolling in the atheist groups.
No, this is a troll from within. How else could so many be so duped so often
time after time after mindbending time?
Male, someone who knows Perl far better than 99% here and who knows enough
of the inside track to know things that a random person wouldn't.
So easily deceptive at merely face value.
e.
------------------------------
Date: 14 Jun 2000 02:15:33 -0500
From: gdpusch@NO.xnet.SPAM.com
Subject: Can XS or SWIG interface a perl script to Java subroutines ???
Message-Id: <m1k8fs7my2.fsf@pusch.integratedgenomics.com>
I have a complicated package of suffix-tree subroutines written in Java
that I've just downloaded from DDJ, and would like to be able to call from
a perl script. Can I do this using XS or SWIG? If so, does anyone know the
URLs of any examples I could look at ???
Thanks in advance,
-- Gordon D. Pusch
------------------------------
Date: Wed, 14 Jun 2000 09:33:35 +0100
From: Matt Sergeant <matt@sergeant.org>
Subject: Re: Can XS or SWIG interface a perl script to Java subroutines ???
Message-Id: <3947435F.7721B4C1@sergeant.org>
gdpusch@NO.xnet.SPAM.com wrote:
>
> I have a complicated package of suffix-tree subroutines written in Java
> that I've just downloaded from DDJ, and would like to be able to call from
> a perl script. Can I do this using XS or SWIG? If so, does anyone know the
> URLs of any examples I could look at ???
No, you can't use XS or SWIG. But you can use CORBA or Java.pm - go to
search.cpan.org and type in "Java" in the search box.
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org
------------------------------
Date: Wed, 14 Jun 2000 13:01:02 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Easy CGI question
Message-Id: <Pine.GHP.4.21.0006141245440.26251-100000@hpplus03.cern.ch>
On 14 Jun 2000, Eric Bohlman wrote:
> Dan Sugalski (dan@tuatha.sidhe.org) wrote:
> : No reason not to get it correct.
Agreed. And what is correct is what the CGI specification says it is.
The following refers only to parsed-headers scripts (NPH scripts, on
the other hand, have to produce a valid and complete HTTP response).
The original NCSA specification says it's either a linefeed or a
carriage-return/linefeed pair. See
http://hoohoo.ncsa.uiuc.edu/cgi/out.html
This isn't sufficiently portable, however. The draft RFC currently has
some awkward wording which I'm told is due for a rewrite; but the
basic idea of what it's trying to say is that the CGI process can
return data using its platform's native newline representation.
(This could even be in EBCDIC, to take an example).
http://www.golux.com/coar/cgi/draft-coar-cgi-v11-03-clean.html#2.2
Keep in mind that the CGI specification defines an interface between
your process and a web server (HTTPD). It's the server's duty to make
the response network-ready for the HTTP protocol.
We went through all this when we discussed the proposal that I was
making for a Perl CGI FAQ, but, despite the best efforts of the
participants here in drafting it, and mine in submitting it to the
Perl bugs list and anyone else who would listen, that seems to have
disappeared into a bit of a black hole for the moment, and now we seem
to be going over the same ground all over again, which is rather a
pity. http://ppewww.ph.gla.ac.uk/~flavell/www/perlcgifaq.html
> But the bare linefeeds *are* correct terminators for *CGI* headers.
> Unless the script is running NPH, it's outputting CGI headers, not HTTP
> headers, and the CGI spec allows bare linefeeds.
Confirmed.
> Remember that you're dealing with two separate interfaces here: the CGI
> interface between the script and the server, and the HTTP interface
> between the server and the user agent.
Exactly.
All the best.
------------------------------
Date: Wed, 14 Jun 2000 07:14:37 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: evaluating expressions
Message-Id: <x7vgzc7mzo.fsf@home.sysarch.com>
>>>>> "TM" == Tad McClellan <tadmc@metronet.com> writes:
TM> On Wed, 14 Jun 2000 03:51:30 GMT, Uri Guttman <uri@sysarch.com> wrote:
>>>>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
>> comprehension on your part. some english phd who can't even follow a
TM> ^^^^^^^^^^^^^^^^
TM> She is not an English PhD.
TM> Everything you see in the movies is not true, heh heh.
do you really think i believe moronzilla is a phd? heh heh back atchya!
:)
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Wed, 14 Jun 2000 12:33:52 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Extract filename from path?
Message-Id: <Pine.GHP.4.21.0006141231340.26251-100000@hpplus03.cern.ch>
On Wed, 14 Jun 2000, Henrik Jönsson hung usenet upside down, and
out popped this:
> I think I found a simpler solution myself:
[...]
> @fileList = split(/\\|\//, $path);
I'd say that's not portable enough.
--
"Some popular newsreaders, such as Outlook Express, automatically put the
cursor above the quoted material; you can take advantage of this by
scrolling down through the prior posting, deleting anything superfluous,
until you reach the point where you want to start your reply." -a.u.e FAQ
------------------------------
Date: Wed, 14 Jun 2000 12:31:58 GMT
From: phool@my-deja.com
Subject: Gif creation on the fly
Message-Id: <8i7tvu$nt8$1@nnrp1.deja.com>
How to creat 2d graph using GifGraph perl module? Any other solution for
plotting 2d graph in perl. I want to write a cgi program which takes
data from a data file and plot a graph in any image format.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 14 Jun 2000 09:46:42 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: help - redefined subroutine warning
Message-Id: <960972513.1587.0.nnrp-10.c3ad6973@news.demon.co.uk>
on the risk of insulting intelligence....
Doesn't mod_perl always give this warning if you update an existing mod_perl
script (ie Apache::Registry, not a mod_perl module used more directly)
without restarting apache?
Does the warning stop happening if you leave it alone at run through the
site a few times? preferably in httpd -X mode.
------------------------------
Date: Wed, 14 Jun 2000 00:21:19 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Help with strings
Message-Id: <3947326F.5F645C47@stomp.stomp.tokyo>
Mike Ray wrote:
(snipped - context retained)
> The code that is giving me problems is as follows:
> if ($PLines[$k] =~ /FORMNAME/) {
> $PLines[$k] =~ /=(.+?)\]/;
> if ($Form{'FORMID'} eq $1) { #THIS LINE ALWAYS FAILS
Your line which always fails relies on
two items matching. Logic dictates you
test those two items, as a small module.
Two of many very powerful tools we can
create ourselves, are a simple print
and replication of an abstract of a
script, that portion with a problem.
Logic dictates you print out both
your variables you are trying to
match, FORMID and $1 then look
at them, visually. Otherwords,
visually verify what is happening.
Piece of cake, yes?
if ($PLines[$k] =~ /FORMNAME/)
{
$PLines[$k] =~ /=(.+?)\]/;
print "PLines Is: $PLines[$k]",
"FORMID Is: $Form{'FORMID'}",
"Variable \$1 Is: $1";
if ($Form{'FORMID'} eq $1)
{
Get the idea? Just a matter of pulling
out only that part of your script you
need to create those variables, under
realistic conditions, leaving out all
else possible. Test your script for
this functional part only via a print
to your screen. Wallah! Instant answer.
Well, lots of answers with your loop
in operation. Doesn't matter though
does it? Multiple prints but only
one clear answer, in reality. Maybe
you could kill the loop? last; ??
Finding an answer is no more difficult
than rolling up your sleeves and doing
a bit of copy and paste along with a
bit of typing to create a test script.
Down below you will see printed results
and a test script I wrote to verify your
style of programming does, in fact, work.
I knew right off, it would. Still, for
me, I want to know with absolute certainty.
If I can take time out to write a bit of
a script to test a few things before making
a post in response, you sure can put out
some effort to test a few things yourself.
Write yourself a test script and find out
exactly what is going on at that stage
of your program where you have problems.
=) <-- That is a smile face, ok?
Now get busy and resolve this bug.
Godzilla!
PRINTED RESULTS
_______________
Begin Test
Variable 1 Is: Kira
Variable 2 Is: 123GAK!456
Variable 3 Is: GAK!
Inside IF:
Variable 1 Is: Kira
Variable 2 Is: 123GAK!456
Variable 3 Is GAK!
Variable $1 Is: GAK!
Success: GAK! Kira is a geek!
TEST SCRIPT
___________
#!/usr/local/bin/perl
print "Content-Type: text/plain\n\n";
$variable1 = "Kira";
$variable2 = "123GAK!456";
$variable3 = "GAK!";
print "Begin Test\n
Variable 1 Is: $variable1\n
Variable 2 Is: $variable2\n
Variable 3 Is: $variable3\n\n";
if ($variable1 =~ /Kira/)
{
$variable2 =~ /[0-9]+([a-zA-Z!]+)[0-9]+/;
print "Inside IF:\n
Variable 1 Is: $variable1\n
Variable 2 Is: $variable2\n
Variable 3 Is $variable3\n
Variable \$1 Is: $1\n\n";
if ($variable3 eq $1)
{
print "Success: $variable3 $variable1 is a geek!\n\n";
}
else
{
print "Failure: Oh Fudge!\n\n";
}
}
exit;
------------------------------
Date: Wed, 14 Jun 2000 10:33:55 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help with strings
Message-Id: <39495c46.4485779@news.skynet.be>
Mike Ray wrote:
> if $foo contains the string 'NLD_Inquiry' the result of the
>"length" function is 17 - longer than the expected 11.
It does sound as if you have invisible characters. Try a hex dump.
local ($, , $\) = (" ", "\n");
print map { sprintf '%02X', $_ } unpack 'C*', $foo;
for 'NLD_Inquiry', I get:
4E 4C 44 5F 49 6E 71 75 69 72 79
>The line with the assignment to the $length1 variable
>causes Perl 5.004 to crash and terminate my script.
As for a "crash"... in CGI context, this could simply mean a warning
which makes the server abort... Are you sure that the variable you're
taking the length of, isn't simply undefined?
--
Bart.
------------------------------
Date: Wed, 14 Jun 2000 12:40:37 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: How to check browser for Javascript enable?
Message-Id: <960982948.8190.0.nnrp-10.c3ad6973@news.demon.co.uk>
<snip>
>To test on the server side whether javascript is enabled on the client
>side is going to cost you an extra round-trip anyway; and by then the
>user could have decided to change their preferences. So I'd advise
>that you're looking at the problem in the wrong way.
I guess from this there is a way, but you don't recommend it.
Where would I find the information on this.
I know pages shouldn't rely on Javascript, but those who run projects don't
always agree on this, at least if I could detect if javascript was not
available I could warn them as to why things weren't working..
------------------------------
Date: Wed, 14 Jun 2000 14:19:58 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How to check browser for Javascript enable?
Message-Id: <Pine.GHP.4.21.0006141411580.26251-100000@hpplus03.cern.ch>
On Wed, 14 Jun 2000, W Kemp wrote:
> >To test on the server side whether javascript is enabled on the client
> >side is going to cost you an extra round-trip anyway; and by then the
> >user could have decided to change their preferences.
> I guess from this there is a way, but you don't recommend it.
Of course, and I don't suppose the one I'm thinking of is the only
possibility. The point I was making is that it's the wrong approach
as a matter of principle, irrespective of quibbles about the details
of one or other way of doing it. This has nothing to do with Perl of
course, but you could have an onLoad event on the Body that activated
some javascript to go and fetch a modified URL. Then in the document
fetched by the modified URL you could do the javascript-only stuff.
Meantime the user, seeing that their browser was noodling away doing
something they hadn't expected to happen, would turn off Javascript,
and leave you up sh** creek without a paddle.
> I know pages shouldn't rely on Javascript, but those who run projects don't
> always agree on this, at least if I could detect if javascript was not
> available I could warn them as to why things weren't working..
That's what <NOSCRIPT> is for. Write your page so that it works
usefully with or without javascript, then the whole idea of the server
needing to know whether it's enabled or not is irrelevant.
cheers
--
"That was a piece of shh...eer spin" - bbc political commentator
------------------------------
Date: 14 Jun 2000 08:45:19 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: How to use LWP::UserAgent to get a zip file?
Message-Id: <8i7gmv$aod$2@slb3.atl.mindspring.net>
dªF½å (tonywu@sonix.com.tw) wrote:
: The following Perl Script can get an HTML page, but if I use the same
: script
: to get a zip file, the zip file format is not correct. Does anyone know how
: to use
: LWP::UserAgent to get a zip file? Thanks a lot.
I doubt that your problem is with LWP.
:
: use LWP::UserAgent;
: my $ua = new LWP::UserAgent();
:
: $ua->agent("Mozilla/3.0");
:
: my $req = new HTTP::Request("GET" => $command);
:
: $req->header("Accept" => "text/html");
Though you probably don't want to do this if you're requesting a file
that *isn't* text/html.
:
: my $res = $ua->request($req);
:
: if ($res->is_success)
: {
: open( OUT, "> yahoo.html" );
Let me guess. You're running on a Win32 system. In that case, you need
to binmode() your filehandle. You *should* always binmode() a filehandle
from which you're going to read or write binary data, regardless of what
platform you're running on.
You should *always* check to see if an attempt to open a file was successful.
: print OUT $res->content();
: close( OUT );
: }
------------------------------
Date: 14 Jun 2000 08:51:06 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: how to write on a file?
Message-Id: <8i7h1q$aod$3@slb3.atl.mindspring.net>
Tad McClellan (tadmc@metronet.com) wrote:
: On Tue, 06 Jun 2000 23:20:54 -0700, The_tick <the_tickNOthSPAM@inet.net.nz.invalid> wrote:
:
: >open(FILE,"location/to/file.txt");
[snip]
: >print FILE "text goes here";
:
:
: This is the only line of code that is OK.
Printing to a filehandle opened as read-only is OK?
------------------------------
Date: Wed, 14 Jun 2000 12:35:09 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Installing active perl
Message-Id: <1_K15.360$fR2.8800@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <3946e3b8.0@oracle.zianet.com>,
"BJ James" <whitemagic@zianet.com> writes:
> I have NT 4.0 sp6 and am trying to install Active Perl's latest.
I have the same setup and have absolutely no problems. Many other machines
that I administrate have the same setup without problems. Reinstall Windows
and then reinstall Perl.
Welcome to Microsoft Windows. HTH HAND.
Clinton "My other box is an NT piece-of-crap" Pierce
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Wed, 14 Jun 2000 10:30:11 GMT
From: vivekvp <vivekvp@spliced.com>
Subject: Login and passwords
Message-Id: <8i7mr9$j3d$1@nnrp1.deja.com>
Hello,
I want to create a web page that has logins and passwords for multiple
users.
Sort of like a web based email (hotmail) - that has login and passwords.
This would grant access to an account.
It would have to allow some one to create a unique login and password -
an allow access to that specific account. also send email to the users
if they lose their password.
It is to be web based - but the back end process to be done in perl.
Anyone aware of a free script that does this - or how to do this?
Thanks,
V
--
He who fights and runs away, lives to run another day!
--
He who fights and runs away, lives to run another day!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 14 Jun 2000 22:31:35 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Multi language messages
Message-Id: <960978611.799791@shelley.paradise.net.nz>
I'm looking for suggestions on the best way to handle error messages in
multiple languages.
At the moment, I'm just thinking of creating a file for each language with
variables set to the appropriate error message, eg:
English
$errmsg1='No';
French
$errmsg1='Non';
Is there a much more efficient way of approaching this setup?
------------------------------
Date: Wed, 14 Jun 2000 13:40:58 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Multi language messages
Message-Id: <Pine.GHP.4.21.0006141329050.26251-100000@hpplus03.cern.ch>
On Wed, 14 Jun 2000, Tintin wrote:
> I'm looking for suggestions on the best way to handle error messages in
> multiple languages.
Big topic.
If you're designing a system, then it's useful to write the error
message calls as message codes with variable data, and have a separate
error-message writing routine which takes a file of error messages in
the appropriate language, and plugs the variable data into it for
display. Note that the ordering of the data terms might need to be
different in the idioms of different languages.
Many years ago I wrote a brief note on how it was done in later
versions of the IBM VM/CMS OS. I still think it was a neat scheme.
I'm sure something very similar is used on other internationalized
software. http://ppewww.ph.gla.ac.uk/~flavell/iso8859/imessages.html
(This actually has nothing to do with iso8859, it's a historical
accident that I put it into that directory, sorry.)
The texts of the messages were removed from the software, and the
system call merely requested that error message IBMABC123E be issued
with parameter1 = value1, parameter2 = value2, etc. The error message
texts themselves were supplied in separate files, written in plain
text, and software was made available for activating a given message
file, effectively "compiling" these messages into system-compatible
form to facilitate efficient lookup of messages at run-time.
I'll be interested to see what you come up with.
------------------------------
Date: Wed, 14 Jun 2000 09:13:35 GMT
From: "Daniel van den Oord" <danielxx@bart.nl>
Subject: never mind !!
Message-Id: <31I15.1227$%h3.25185@Typhoon.bART.nl>
never mind had to use no strict "vars";
------------------------------
Date: Wed, 14 Jun 2000 11:18:07 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: never mind !!
Message-Id: <394d69cf.7950283@news.skynet.be>
Daniel van den Oord wrote:
>never mind had to use no strict "vars";
But then there's no use in using strict at all.
--
Bart.
------------------------------
Date: Wed, 14 Jun 2000 10:35:51 GMT
From: peterpchurch@my-deja.com
Subject: Opening a file for realtime monitoring
Message-Id: <8i7n66$jed$1@nnrp1.deja.com>
Hi
I am trying to write a perlscript that will watch an alarm log
and then send me any errors that occur the trouble is that I dont know
how to set my filehandle to read the alarmfile as new entries are made
to it and not just the once when the script is executed.
Thankyou
peter
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 14 Jun 2000 12:04:03 GMT
From: Paul Eckert <peckert@epicrealm.com>
Subject: Re: Opening a file for realtime monitoring
Message-Id: <3947747F.AF682DB6@epicrealm.com>
Dear Peter:
Try this:
#!/usr/local/bin/perl -w
$fn = "test.log";
open INF, "tail -f $fn |" or die "Couldn't fork() tail process...: $!";
while (<INF>) {
# do something with line
print;
}
close (INF);
Hope that helps.
Paul
peterpchurch@my-deja.com wrote:
>
> Hi
> I am trying to write a perlscript that will watch an alarm log
> and then send me any errors that occur the trouble is that I dont know
> how to set my filehandle to read the alarmfile as new entries are made
> to it and not just the once when the script is executed.
>
> Thankyou
>
> peter
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
Paul Eckert
Sr. Software Engineer
Epicrealm Inc.
1651 N. Glenville Dr., Suite 212
Richardson, TX 75081
(972) 479-0135 x300
peckert@epicrealm.com
------------------------------
Date: Wed, 14 Jun 2000 12:41:43 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl and .htaccess
Message-Id: <Pine.GHP.4.21.0006141234590.26251-100000@hpplus03.cern.ch>
On Tue, 13 Jun 2000, Bob Tate wrote:
> I am trying to find out if there is a way in Perl to provide a website user
> to a secured website using .htaccess procedures to be able to "Logoff" by
> clicking a button.
No more and no less than in any other programming language.
.htaccess is just a place for putting directives. It doesn't in
itself "do" anything. I'm assuming you were talking about "basic
authentication".
The issue is a complex one, since basic authentication and "login" are
two subtly but significantly different concepts. It's covered to some
extent in Nick Kew's CGI FAQ and an associated tutorial.
> This would remove the reference stored in memory of the
> browser to be removed
You don't get to execute any Perl on the average web browser, so this
is heading in entirely the wrong direction, as well as being
distinctly off-topic for this c.l.p.misc group. f'ups suggested, but
please read the relevant faqs first.
good luck
------------------------------
Date: Wed, 14 Jun 2000 09:37:56 GMT
From: "Lee Dobson" <ldobson@enterprise.net>
Subject: Re: Perl and MM Flash
Message-Id: <960975756.274966@dynamite.advsys.co.uk>
This isn't really a Perl question, but here goes...
I guess you could do a "Load variables" command, you'll find it in
"Actions", "Load/Unload Movie" - build up the entire URL in a variable, then
use "Load variables" to call it. It will expect to get back a simple text
file with key/value pairs, so make sure your Perl script passes the info
back in this format. Then you can interpret these pairs to determine whether
the script ran successfully or not. This will all be done without firing off
any other windows at all. Note that you'll probably want to load the
variables into Level 0, and not Level 1, which is what it defaults to.
Note that I havent tried this approach, but I dont see any reason why it
wouldn't work.
Craig Geiger wrote in message ...
>Forgive me for such a simple question, but I have a Perl script that gets
>called by a Flash movie. The Flash movie sends variables using POST (or it
>could be via GET method) to a Perl script. The Perl script is simple,
reads
>and parses the variables, dumps them into a piece of email, and sends it.
>My question is this, is it possible to execute the script without ever
>leaving the Flash movie (running in the browser window). Right now, all I
>can get to work is that the Flash movie calls the Perl script into a new
>window and prints some 'thank you we received your comments bla bla bla'
>HTML, which works, but is somewhat redundant and obtuse. It would be great
>if the Perl script was executed and the user never got a new window and
left
>the Flash movie. Thanks for the advice,
>
>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3352
**************************************