[12774] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 184 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 18 19:07:15 1999

Date: Sun, 18 Jul 1999 16:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 18 Jul 1999     Volume: 9 Number: 184

Today's topics:
        [Q] In-Browser technology <reason@shadow.net>
    Re: ActiveState Perl -w Problem? <aperrin@mcmahon.qal.berkeley.edu>
    Re: ActiveState Perl -w Problem? <jeff@vpservices.com>
    Re: Anybody know how to to this? (Marcel Grunauer)
    Re: Anybody know how to to this? (Abigail)
    Re: Can a .html file be executable? <mike@crusaders.no>
        CGI database question <loprestim@toad.net>
    Re: CGI::Fast vs. Apache (brian d foy)
        compile failed <yashi@yashi.com>
        compliled perl in a client-server production environmen (Eric Smith)
        find a line which matchs two values, and change the lin <factory@factory.co.kr>
    Re: Future of Perl <andrewf@beausys.demon.co.uk>
        Help with Regular Expression. <jamesthurley@hotmail.com>
    Re: Help with Regular Expression. (Tad McClellan)
    Re: How do I check if the server have DBI or DBD:ODBC i <jeff@vpservices.com>
        how to make win95 command line know perl wihtout .pl mamorshedi@my-deja.com
    Re: how to make win95 command line know perl wihtout .p (Michel Dalle)
    Re: Http 500 Error running CGI scripts on PWS 4.0 [win9 <loprestim@toad.net>
    Re: Keeping competitors out (brian d foy)
    Re: Looking for a free web hosting with perl <bwalton@rochester.rr.com>
        LWP::Parallel::UserAgent Timeouts wired2000@my-deja.com
        LWP::UserAgent redirects <hykit@jps.net>
    Re: Perl, Apche, Win32 and Crypt Question <bwalton@rochester.rr.com>
    Re: pure perl solution for Blowfish, DES or IDEA? (brian d foy)
    Re: pure perl solution for Blowfish, DES or IDEA? (I R A Darth Aggie)
    Re: Q: panic pp_iter with foreach spertus@mills.edu
        RealVideo analyzer in Perl <phade@powerweb.de>
    Re: Some more benchmark results: <aperrin@mcmahon.qal.berkeley.edu>
    Re: String (Neko)
    Re: String <rick.delaney@home.com>
    Re: Tiny error in perlfaq5 (Kevin Reid)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sat, 17 Jul 1999 22:37:39 -0400
From: "Vladik" <reason@shadow.net>
Subject: [Q] In-Browser technology
Message-Id: <932337314.611.103@news.remarQ.com>

Hello,
Sorry for cross-posting, but
my question is really to the people on the news groups
who know about Eiffel, Python and Perl.

Basically,
We are to develop a web client (a program that
can be ran witting a web browser) for our otherwise n-tier
cross-platform system, our research department gave the
recommendation and actually a prototype of the client
in MS ASP (active server pages) and, I think but not
sure, blended with Visual Basic. Talk about bias...
But this means that it can only run in MS IE and not
in Netscape, also it limits the number of platforms not only
for the client on which web browser runs, but also for
the web server (MS platforms only, because web server with
active pages can only run there)
There is some talk about Java, but our web client
will also be ran via Serial links (not T1 connections)
on relatively inexpensive systems -- therefore Java is
something to look into but it may be slow.
So I am set on a quest to find something
that
a) can be executed within IE or Netscape,
b) be faster and overall more resource friendly then JavaScript technology
c) supports OO programming
d) does not depend on the platform on which web server is running.( if the
web server is running NT or UNIX (sun, linux)

I have found one thing that almost satisfies the requirements:
it is based on Oberon-2 programming language and so far sounds
VERY promising.
  The reason why I am still looking is because
there are more books and internet support for Python,Perl and Eiffel
then for Oberon (this will be a factor when presenting the proposal
to the management).  The other problem is that there is plugin
for this technology available for NT and Mac platforms (for both
IE and Netscape) and is not available for UNIX platforms (which means that a
web browser can not be ran on UNIX). There is source code,
though.
If interested: http://caesar.ics.uci.edu/juice/

So, finally, my question is is there a technology
I am looking for available for either Perl or Eiffel or Python

Since I am cross-posting, I would appreciate a reply
by mail as well.

Thanks in advance,
Vladislav





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

Date: Sun, 18 Jul 1999 12:39:11 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: ActiveState Perl -w Problem?
Message-Id: <37922D5E.36ECE7D2@mcmahon.qal.berkeley.edu>

> "James M. Mastros" wrote:
> >
> > In specific, your shebang line has to include the string "perl" in it
> > somewhere.  "#!/usr/bin/perl -w" will work just find on a win32 system
>
> Well, no, that is not neccessarily true.  From the command line of
> win95/98, no shebang line will work at all.

WRONG! Perl always examines the #! line, even if it's on a braindead machine
that won't use the shebang to interpret the script. Switches are set
appropriately.

>
>
> >  If perl finds 'perl', it will process the args on the shebang.
>
> Nope, sorry, wrong.  That thinking is what led you to the mistakes
> above.  Perl doesn't find "perl" --

Wrong again - see above.

> the command processor or web server
> finds the shebang line

True for the first use of the shebang line (making the OS pipe the script
through the right processor), false for the above-discussed use.

ap


--
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting - aperrin@mcmahon.qal.berkeley.edu

            I'M LOOKING FOR ANOTHER EXPERIENCED ACCESS
               DEVELOPER - CONTACT ME IF INTERESTED.
        http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------




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

Date: 18 Jul 1999 19:29:39 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: ActiveState Perl -w Problem?
Message-Id: <37922A75.9C72F60@vpservices.com>

Michael Rubenstein wrote:
> 
> On 18 Jul 1999 16:16:47 GMT, Jeff Zucker <jeff@vpservices.com>
> wrote:
> >
> > From the command line of win95/98, no shebang line will work at all.
>
> apparently my Win32 version of Perl is broken as it does
> examine the #! line and use the switches under Windows NT.

Yes, you are right it examines the switches.  What I should have said is
that it doesn't examine the "#!/somepath/perl" part of the shebang to
determine where the perl executable is.

-- 
Jeff


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

Date: Sun, 18 Jul 1999 18:50:59 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Anybody know how to to this?
Message-Id: <3794215f.17153916@enews.newsguy.com>

On 18 Jul 1999 18:14:39 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:

>Err sorry this doesnt make sense - there is only *one* Common Gateway
>Interface - to speak of 'a CGI' would imply that there was more than one.
>If you are talking about a program that uses the CGI then you might be
>forgiven for using the semantically  awkward 'CGI Program' (as indeed most
>do) but there is no such thing as 'a CGI' believe me.  If you want to defend
>this usage then you will have to defend 'an HTTP' (describing a web site),
>or perhaps even 'a TELNET' (describing a remote computer).

People have this irritating tendency of making subject into a verb to
shorten speech, like

"to isdn something" = to send something using isdn.

That said, they still say "to download something" instead of
"modemming" or "lanning". But then they use the term also when
referring to the mere act of copying something, like "download this
file from the floppy".

Likewise, "to telnet", "to email".


Marcel
-- 
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'


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

Date: 18 Jul 1999 17:52:55 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Anybody know how to to this?
Message-Id: <slrn7p4ml4.c9j.abigail@alexandra.delanet.com>

Marcel Grunauer (marcel.grunauer@lovely.net) wrote on MMCXLVII September
MCMXCIII in <URL:news:3794215f.17153916@enews.newsguy.com>:
!! On 18 Jul 1999 18:14:39 -0000, Jonathan Stowe
!! <gellyfish@gellyfish.com> wrote:
!! 
!! >Err sorry this doesnt make sense - there is only *one* Common Gateway
!! >Interface - to speak of 'a CGI' would imply that there was more than one.
!! >If you are talking about a program that uses the CGI then you might be
!! >forgiven for using the semantically  awkward 'CGI Program' (as indeed most
!! >do) but there is no such thing as 'a CGI' believe me.  If you want to defend
!! >this usage then you will have to defend 'an HTTP' (describing a web site),
!! >or perhaps even 'a TELNET' (describing a remote computer).
!! 
!! People have this irritating tendency of making subject into a verb to
!! shorten speech, like

CGI     - three syllables.
program - two syllables.

*What* shortening are you talking about?



Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 18 Jul 1999 22:00:01 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Can a .html file be executable?
Message-Id: <Knqk3.398$pB5.2574@news1.online.no>

Scientia <scientia@XXXtechnologist.com> wrote in message
news:379279D3.7E0B@XXXtechnologist.com...
> I try to explain better my problem.
> The question IS about Perl, because I need to make
> a CGI program in Perl in a certain file.
> But (for reasons too long to explain) I must call this file
> something.html! I can't call it something.cgi or something.pl!

well, actually. Even though the program is written in perl - it's not a perl
problem..

It's probably possible to achieve this, but it requires reconfiguring of the
webserver and so it becomes a webserver-problem.

--
Trond Michelsen





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

Date: Sun, 18 Jul 1999 18:17:37 -0400
From: matt <loprestim@toad.net>
Subject: CGI database question
Message-Id: <37925280.D6ED0793@toad.net>

I am trying to use CGI to access an access database, and what I want to
do is retrieve values from the database, and populate a drop down
selection list like:

<SELECT NAME="name">
while (db->row){
    print "<OPTION>$db_field";
}
</SELECT>

This does not work. Are there other ways to do this without writing out
top a file?
Any ideas?

Thanks in advance,
-Matt
mlopresti@bigfoot.com



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

Date: Sun, 18 Jul 1999 15:28:59 -0400
From: brian@pm.org (brian d foy)
Subject: Re: CGI::Fast vs. Apache
Message-Id: <brian-ya02408000R1807991528590001@news.panix.com>

In article <379210B2.CD3548FA@mit.edu>, Jerrad Pierce <belg4mit@mit.edu> posted:

> Which will get me more bang (efficiency and speed) for my buck (time spent
> learning it)?
> 
> mod_perl seems to be more robust, but there also seem to be an inordinate number
> of caveats.

Fastcgi is still CGI, mostly.  native mod_perl (not Apache::Registry)
should be much faster.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 18 Jul 1999 14:37:45 -0400
From: Yasushi Shoji <yashi@yashi.com>
Subject: compile failed
Message-Id: <19990718143745V.yashi@yashi.com>

hello,

i just compiled perl5.005_03 + jperl5.005_03-990703.pat.gz on
linux 2.2.x, glibc-2.1.1, egcs-2.91.66.

i tried both
$ CC=gcc ./configure.gnu
$ sh Configure.

and with either way, make test failed at anydbm test 12

~/perl5.005_03/t$ ./perl lib/anydbm.t 
1..12
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
not ok 12

could someone give me an advice where i should check first?

~/perl5.005_03/t$ ldd ./perl 
        libnsl.so.1 => /lib/libnsl.so.1 (0x4001a000)
        libdb.so.3 => /lib/libdb.so.3 (0x40032000)
        libgdbm.so.2 => /usr/local/lib/libgdbm.so.2 (0x4006e000)
        libdl.so.2 => /lib/libdl.so.2 (0x40074000)
        libm.so.6 => /lib/libm.so.6 (0x40077000)
        libc.so.6 => /lib/libc.so.6 (0x40094000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4018c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
--
            yashi


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

Date: 18 Jul 1999 19:43:19 GMT
From: eric@fruitcom.com (Eric Smith)
Subject: compliled perl in a client-server production environment
Message-Id: <slrn7p4bj9.jsm.eric@plum.fruitcom.com>

Hi

We currently supply executable scripts (created with perlapp) to customers
who use our SQL/Delphi application on a network.  Now we have developed our
own reporting engine with perl DBI and wish to extend our perl component to
create other sub-systems or utilities - all need to be compiled.

Currently, each client has a `report.exe' compiled perl file which accesses the
central database and outputs to their local client viewers (like m$ word).

Is there a better and more efficient and easier to maintain solution (with
the perl living in _one_ location and the same perl code being accessed by
all clients?  Multiple accesses need to be efficiently handled.

Thanks 

*blush* Well this message came through, please excuse the blank one (vim
problems)

-- 
Eric Smith
<eric@fruitcom.com> 
www.fruitcom.com
Tel. 021 423 6111



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

Date: Mon, 19 Jul 1999 07:20:37 +0900
From: "Yeong Mo/Director Hana co." <factory@factory.co.kr>
Subject: find a line which matchs two values, and change the line to new entry ?
Message-Id: <7mtje3$sjf$1@news1.kornet.net>

There are stored the following array in a data file.
($1, $2, $3, $4, $5)= split(/&&/, $line);

I want to find a line which matchs two values, and change the line to new
entry.

For example,
If input values are $1=aaa and $5=bbb,
find a line which has "aaa" and "bbb" at $1 and $5.
And delete the line and write it with other values.

How to handle it ?

Thanks in advance.




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

Date: Sun, 18 Jul 1999 22:55:03 +0100
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: Future of Perl
Message-Id: <by2ZJJA30kk3EwFf@beausys.demon.co.uk>

In article <3797cd5a.172442315@news.giganews.com>, Jeffrey
<Jeffrey@ix.netcom.com> writes
>On 15 Jul 1999 23:24:02 -0500, abigail@delanet.com (Abigail) wrote:
>
>>Don't judge programming languages on their usefullness, judge them on
>>their marketable value! That'll increase the quality of code and will
>>bring us closer to world peace.
>
>Listen bitch, I learned a lot about how to program the Amiga computer
>and then it died in the marketplace. I don't want something like that
>to happen ever again. A language isn't fucking useful if you can't get
>a job programming in it.
>
>As for my original question, it was spurred by a comment in a CGI book
>that Java would take over and Perl would become a legacy language.
>Someone said the same thing in a message when I did a search on Deja
>News. So don't act like my question was so fucking stupid, bitch.
>

I cant help feeling that one has to read this in a Cartman-like voice.

I'd just like to say that I've been using Perl for only 6 months, and
I love it. I can knock out utils so much quicker than with C and Java.

---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).


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

Date: Sun, 18 Jul 1999 20:44:05 +0100
From: "James Thurley" <jamesthurley@hotmail.com>
Subject: Help with Regular Expression.
Message-Id: <7mtani$372$1@gxsn.com>


I'm trying to find any lines without a semicolon on the end, whilst ignoring
the ones which don't need one.  (to help debug syntax errors in long perl
programs)
I thought this would work:

^\t*[^(if)(EOM)(else)(while)(for)(elsif)\#]+?[^;{}>]$

but it doesn't.  I'm not sure the round brackets around the words (if, for,
etc) are ok.
Any suggestions?

Thanks,
James.







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

Date: Sun, 18 Jul 1999 11:48:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with Regular Expression.
Message-Id: <u0tsm7.qg1.ln@magna.metronet.com>

James Thurley (jamesthurley@hotmail.com) wrote:

: I'm trying to find any lines without a semicolon on the end, whilst ignoring
: the ones which don't need one.  (to help debug syntax errors in long perl
: programs)


   You do know, of course, that "only perl can parse Perl"?

   Meaning, what you are trying to do cannot be done rigorously.

   And on top of that, semicolons are not required at the ends of
   lines. They are required (sometimes) at the end of _statements_.


   {
      print "Hello world"
   }
   # no semicolon needed there.


   print "Hello world" print "\n";
   # missing a semicolon there, but not at the end of the line


: I thought this would work:

: ^\t*[^(if)(EOM)(else)(while)(for)(elsif)\#]+?[^;{}>]$


   EOM is not a Perl keyword.

   And you are missing a bunch that _are_ keywords (unless, until...)


   And you have a profound misunderstanding of how [Character Classes]
   work.

   The above code will work _identically_ if you replace the first
   char class (the part in the square brackets) with

      [^#()EMOefhilorsw]

   Not what you want, I'm sure.

   See the "Version 8 Regular Expressions" section in perlre.pod
   to find out how char classes really work.

   
: Any suggestions?


   Give up on trying to parse Perl code.

   Syntax errors are pretty easy to find anyway (a "stupid" machine
   can find them), it is the semantic errors that are the time sinks.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 18 Jul 1999 18:47:57 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: How do I check if the server have DBI or DBD:ODBC installed?
Message-Id: <379220B2.D5E886A9@vpservices.com>

Carfield Yim wrote:
> 
> As title, I don't know whether can I use these function.

From the command prompt:  perl -MDBI -e "print DBI->available_drivers"

--
Jeff


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

Date: Sun, 18 Jul 1999 20:57:30 GMT
From: mamorshedi@my-deja.com
Subject: how to make win95 command line know perl wihtout .pl
Message-Id: <7mtf3m$a7l$1@nnrp1.deja.com>

I have set up file type association for perl script through file type
dialog box and currently I can run the perl script by double
clicking the file name from Explorer.  This is I got, thanks to some
very helpful FAQ.  My current question is if there is a way of doing the
same file association in command.com environment.  Also is there a way
to run the perl script by invoking the name of the scrip only; without
type "perl" first.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sun, 18 Jul 1999 22:16:22 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: how to make win95 command line know perl wihtout .pl
Message-Id: <7mtjlr$84d$1@xenon.inbe.net>

In article <7mtf3m$a7l$1@nnrp1.deja.com>, mamorshedi@my-deja.com wrote:
>I have set up file type association for perl script through file type
>dialog box and currently I can run the perl script by double
>clicking the file name from Explorer.  This is I got, thanks to some
>very helpful FAQ.  My current question is if there is a way of doing the
>same file association in command.com environment.  Also is there a way
>to run the perl script by invoking the name of the scrip only; without
>type "perl" first.


Have a look at pl2bat.bat. It's located in your Perl\bin directory, normally.


Michel.


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

Date: Sun, 18 Jul 1999 18:09:53 -0400
From: matt <loprestim@toad.net>
Subject: Re: Http 500 Error running CGI scripts on PWS 4.0 [win98]
Message-Id: <379250B1.E7ED01EC@toad.net>

Preston,

I have tried to use PWS, and had alot problems with it. My advise to you: get
the apache web server for Win32. I installed it, and have had no problems with
cgi running on it. You can get it at www.apache.org. If you would rather stick
with PWS, looking at your script, the header make sure in fact that the
perl.exe resides in /usr/local/bin. If not make that path ie. #!/perl/bin/perl

Preston Davis wrote:

> Greetings,
>
> Getting a wierd error [http 500 ] message when calling a cgi script
> located in cgi-bin directory of root web. I'm on win98, Personal
> Web Server 4.0.. Note** My web server [advanced properties] states
> that "read | scripts | execute" permission all enabled!?! What gives?
>
> Any help would be greatly appreciated!
> Thanks in advance, Preston
>
> The html [ form portion only]:
>
> =======================
> <form action="cgi-bin/hello.cgi" name="form1">
> <p>Welcome to the STI Log-in Page</p>
> <table bgcolor="tan">
> <tr>
> <td>Name:</td><td colspan="2"><input type="text" name="name" value=" "
> size="20" maxlength="20"></td>
> </tr>
> <tr>
> <td>Password:</td><td><input type="password" name="password" size="7"
> maxlength="7"></td><td><input type="submit" name="hello_pl" value="submit"
> width="20" width="10"></td>
> </tr>
> </table>
> </form>
> =======================
>
> The cgi script [ in perl ]
>
> #!/usr/bin/perl
> print "Content-type:text/html\n\n";
>
> print "<html>\n";
> print "<title>testing perl</title>\n";
> print "<style type='text/css'>\n";
> print "<!-- p{font-family:verdana;font-size:12pt} -->\n";
> print "</style>\n";
> print "<body bgcolor=#000000><p><font color='green'>this is a
> test</font></p></body>\n";
> print "</html>\n";
>
> =========================
>
> any clues would be extremely helpful



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

Date: Sun, 18 Jul 1999 15:32:29 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Keeping competitors out
Message-Id: <brian-ya02408000R1807991532290001@news.panix.com>

In article <Pine.LNX.3.96.990718133350.8738C-100000@apollo.netsoc.tcd.ie>, Chris <chris@netsoc.tcd.ie> posted:

> At work, I've recently been asked to write a Perl function which will
> prevent our competitors from logging on to one of our web pages
> (which would be done via a CGI script).

there is no way to do this.  you would have to block everything since
they'll just end up coming in from another direction, such as an AOL
account, etc.

even if you still wanted to do this, Perl is not the answer (unless 
you are making a mod_perl auth handler).  this is a server configuration
thing.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Sun, 18 Jul 1999 15:22:19 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Looking for a free web hosting with perl
Message-Id: <3792296B.DE6E0CF5@rochester.rr.com>

Juan Riera wrote:

> Hello,
> Does anybody knows about any free web site hosting that admits perl cgi
> programming? I would like to test a home site - home developped.

 ...
Why don't you put up your own web server on your own computer?  There are
free ones available.



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

Date: Sun, 18 Jul 1999 22:17:44 GMT
From: wired2000@my-deja.com
Subject: LWP::Parallel::UserAgent Timeouts
Message-Id: <7mtjq1$bhp$1@nnrp1.deja.com>

Hi,

I'm having problems timing out HTTP requests with
LWP::Parallel::UserAgent, has anyone had any luck? I used the sample
code in perldoc LWP::Parallel::UserAgent as requested, but no luck :(

Sample code used:

        my $pua = LWP::Parallel::UserAgent->new();
        $pua->in_order  (1);  # handle requests in order
        $pua->duplicates(0);  # ignore duplicates
        $pua->timeout   (2);  # in seconds
        $pua->redirect  (1);  # follow redirects
	$pua->max_req   (1);  # max parallel requests per server
        $pua->max_hosts (10);  # max parallel servers accessed

Then I loop through each request:

	# Store all status codes into array
	while ($req = pop(@reqs) ){
         if (my $res = $pua->register($req)) {print STDERR
        $res->error_as_HTML;)
 	}

Anyone have any ideas why $pua->timeout(X) is not working? Any help
appreciated.

Thanks
Charles


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sun, 18 Jul 1999 15:05:09 -0700
From: Kit <hykit@jps.net>
Subject: LWP::UserAgent redirects
Message-Id: <180719991505096028%hykit@jps.net>

The LWP modules are great.  I have gotten the LWP::UserAgent to handle
a variety of request.  However, I ran into one big problem.  It can't
handle redirects in POST request method.  I override the
LWP::UserAgent::redirect_ok subroutine.

--------------------------------------------------------------------
package PostAgent;
@ISA = qw(LWP::UserAgent);

sub redirect_ok
{
    # draft-ietf-http-v10-spec-02.ps from www.ics.uci.edu, specify:
    #
    # If the 30[12] status code is received in response to a request
using
    # the POST method, the user agent must not automatically redirect
the
    # request unless it can be confirmed by the user, since this might
change
    # the conditions under which the request was issued.

    my($self, $request) = @_;
    #return 0 if $request->method eq "POST";
    1;
}
---------------------------------------------------------------------

However, the results are not what I wanted.  I encounter two problems.

1.  The refferer header remains unchanged, still pointing to my server
instead of the server that was being POST to and responded with the
'Location: ' redirect.

cgi--> POST==> server--> Sends 'Location: '==> cgi--> handles
redirect==> server--> detects refferer is not local host and fails to
send requested info.

A web browser on the other hand has no problems
browser--> POST==> server--> Sends 'Location: '==> browser--> handles
redirect==> server--> detects refferer is local host and returns the
requested info.


2. The server requires the UserAgent to accept cookies before it
returns the requested info.

cgi--> POST==> server--> Sends 'Location: '==> cgi--> handles
redirect==> server--> set cookie==> cgi--> does not accept cookies==>
server--> detects no cookie accepted and outputs "No cookie accepted. 
Cookie is required."


My question:  How do I handle POST redirect with LWP:UserAgent just
like a browser does?  Redirect meaning server sends "Location: "
header.


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

Date: Sun, 18 Jul 1999 15:33:19 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Perl, Apche, Win32 and Crypt Question
Message-Id: <37922BFF.F808AD4B@rochester.rr.com>

Anthony Kirby wrote:

> I am trying to create a simple cgi script that will allow me to add, modify
> or remove users and passwords from the Apache .htpasswd file.  I am running
> Apache on a Windows System which defaults the password encryption to MD5.  I
> have tried the 'crypt' function but it doesn't crypt the password in MD5.
> Could someone please help me on this...

 ...
Anthony, try the MD5 package.  If you don't know about packages, see
http://www.perl.com, and click on CPAN.



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

Date: Sun, 18 Jul 1999 15:36:13 -0400
From: brian@pm.org (brian d foy)
Subject: Re: pure perl solution for Blowfish, DES or IDEA?
Message-Id: <brian-ya02408000R1807991536130001@news.panix.com>

In article <3790C3F2.8AEB1E78@muenster.de>, Rainer Hillebrand <rainer.hillebrand@muenster.de> posted:

> Does anyone know a pure perl solution for Blowfish, DES or IDEA? I can't
> install the known modules on the web server because I only have a ftp
> access to my web server.

become friends with the sysadmin.  have you even asked that it be
installed?  a six pack of beer can go a long way. ;)

i'm serious.  sometimes technology is not the best solution.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 18 Jul 1999 21:55:20 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: pure perl solution for Blowfish, DES or IDEA?
Message-Id: <slrn7p4jeg.cq7.fl_aggie@thepentagon.com>

On Sun, 18 Jul 1999 15:36:13 -0400, brian d foy <brian@pm.org>, in
<brian-ya02408000R1807991536130001@news.panix.com> wrote:

+ i'm serious.  sometimes technology is not the best solution.

perl -e 'use Beer::SixPack;'

Can't locate Beer/SixPack.pm in @INC

Darn. Another cool module I don't have.

James


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

Date: Sun, 18 Jul 1999 22:41:17 GMT
From: spertus@mills.edu
Subject: Re: Q: panic pp_iter with foreach
Message-Id: <7mtl6c$buu$1@nnrp1.deja.com>

FYI, the perl5-porters responded to my perlbug message amazingly quickly
with an experimental patch.  Anybody running in to the same error can
contact me (or them) for the fix.

Ellen Spertus


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 19 Jul 1999 00:15:33 +0000
From: Frank Gadegast <phade@powerweb.de>
Subject: RealVideo analyzer in Perl
Message-Id: <37926E25.CF07B70A@powerweb.de>

Hi Folks,

does anybody know about a perl-script or module
that will create some HTML or ASCII-stat files
from RealVideo Server logfiles ?

Please reply by eMail.

Many thnx in advance, Frank
--
Dipl.-Inform. Frank Gadegast                  mailto:frank@gadegast.de
PHADE Software - PowerWeb                       http://www.powerweb.de
Leibnizstr. 30, 10625 Berlin, Germany        fon/fax: ++ 49 30 3128103
======================================================================
  PowerWeb =     Deutschlands einziger Pauschal-Webhoster mit freiem
  Platz im Netz     Speicherplatz UND freiem Uebertragungsvolumen.


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

Date: Sun, 18 Jul 1999 12:17:05 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Some more benchmark results:
Message-Id: <37922831.7777A065@mcmahon.qal.berkeley.edu>

Oops. Doing nothing *and* ending up with a case of foot-in-mouth
disease, now, *that's* impressive....

ap

Marcel Grunauer wrote:

> >See my answer to Andrew Perrin.  Doing nothing is often faster than
> >doing something.
>
> Doing nothing sure takes less resources than doing something.

--
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu
            I'M LOOKING FOR ANOTHER EXPERIENCED ACCESS
               DEVELOPER - CONTACT ME IF INTERESTED.
        http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------




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

Date: 18 Jul 1999 21:18:37 GMT
From: tgy@chocobo.org (Neko)
Subject: Re: String
Message-Id: <7mtgbd$6l0$0@216.39.141.200>

On Sun, 18 Jul 1999 14:12:41 GMT, michel.dalle@usa.net (Michel Dalle) wrote:

>In article <7msgr1$nb0$1@news01.btx.dtag.de>, "Marc" <marc.barieux@t-online.de> wrote:
>>Hi,
>>I'd like to know how I can extract lines from a string in Perl... I'm new to
>>this language and have no ideas how to do that.
>
>Presuming $lines contain several lines, you can use 'split' to split it :
>
>@lines = split("\n",$lines);

That has the effect of chomping each line, which is often useful.  It also
causes an extraneous empty line at the end though, if all lines are newline
terminated.  This is what I usually do:

    @lines = split /^/, $lines;

Sometimes I worry that the special case will disappear, and I do it
explicitly:

    @lines = split /^/m, $lines;

-- 
Neko | tgy@chocobo.org | Will hack Perl for a moogle stuffy! =^.^=


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

Date: Sun, 18 Jul 1999 21:58:47 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: String
Message-Id: <37924DEE.D9B23911@home.com>

[posted & mailed]

Neko wrote:
> 
> On Sun, 18 Jul 1999 14:12:41 GMT, michel.dalle@usa.net (Michel Dalle) wrote:
> 
> >
> >@lines = split("\n",$lines);
> 
> That has the effect of chomping each line, which is often useful.  It also
> causes an extraneous empty line at the end though, if all lines are newline
> terminated.  

No it doesn't.  split strips trailing null fields.

> This is what I usually do:
> 
>     @lines = split /^/, $lines;
> 
> Sometimes I worry that the special case will disappear, and I do it
> explicitly:
> 
>     @lines = split /^/m, $lines;

Probably a good idea since I'm pretty sure this six-legged 'special
case' isn't documented.  I'll let you look it up, though, when you're
checking the bit about trailing null fields.  :-)

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sun, 18 Jul 1999 18:33:24 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Tiny error in perlfaq5
Message-Id: <1dv1hby.1pf63bad81mkgN@[192.168.0.1]>

Bart Lateur <bart.lateur@skynet.be> wrote:

> BTW what's the use of rand(EXPR), if it gives a result that is exactly
> the same as EXPR*rand?

Less punctuation and less chance of error.

#!perl -w

$\ = "\n";

print rand 1000;     # Nice.
print rand(1000);    # Same but I prefer the previous one.
print rand * 1000;   # Oops!
print 1000 * rand;   # Ugly.
print rand() * 1000; # Uglier.
print (rand) * 1000; # Oops again!

__END__

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 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.  

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 V9 Issue 184
*************************************


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