[16536] in Perl-Users-Digest
Perl-Users Digest, Issue: 3948 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 8 11:06:53 2000
Date: Tue, 8 Aug 2000 08:05:13 -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: <965747113-v9-i3948@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 8 Aug 2000 Volume: 9 Number: 3948
Today's topics:
-MCPAN warning <SixteenPintsANight@Beer.com>
Re: about "syntax error" of perl program <jboes@eoexchange.com>
Chess Game (Deep Blue) in Perl? <as@if.com>
Re: Chess Game (Deep Blue) in Perl? (Abigail)
CPAN error... <SixteenPintsANight@Beer.com>
Re: date manipulation (Keith Calvert Ivey)
Re: Embedded spaces in arrays (Abigail)
Re: Expert advise needed (Abigail)
Re: Expert advise needed <nickco3@yahoo.co.uk>
Re: Expert advise needed <nickco3@yahoo.co.uk>
Re: function like grep (Abigail)
Re: Game programming in perl...? <tripix@metaverse.fsnet.co.uk>
Re: get files from other servers <nickco3@yahoo.co.uk>
Re: get files from other servers <tony_curtis32@yahoo.com>
get temporary file name? <edmond.nolan@primus-online.de>
Re: get temporary file name? (Andreas Kahari)
Re: get temporary file name? <edmond.nolan@primus-online.de>
Re: Have split question (Keith Calvert Ivey)
Re: Have split question (Abigail)
Re: Help with LWP <SixteenPintsANight@Beer.com>
Re: How to capture CGI program .exe output, modify it a <SixteenPintsANight@Beer.com>
Re: Need help!! (Keith Calvert Ivey)
newbie hash type question. <sysadmin@tbkcoders.com>
OT FS: PerlServices.com Domain Name windywisconsin@my-deja.com
Re: Perl on Windows - how to keep the window <joelnelson@home.net>
Re: Pop Ups <tony_curtis32@yahoo.com>
Re: Pop Ups <joelnelson@home.net>
Re: Pop Ups <joelnelson@home.net>
Re: Pop Ups <joelnelson@home.net>
Re: Programming Ethics <jboes@eoexchange.com>
Re: reg expressions - protect html <SixteenPintsANight@Beer.com>
Re: reg expressions - protect html <russ_jones@rac.ray.com>
Re: Regular Expressions & Substitution <ren.maddox@tivoli.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 6 Aug 2000 09:17:00 -0700
From: "ekkis" <SixteenPintsANight@Beer.com>
Subject: -MCPAN warning
Message-Id: <fdgj5.5$ik6.2174@news.pacbell.net>
can anyone tell me what the deal is? when I run "perl -MCPAN -e shell" I
get the following:
Warning [/etc/inputrc line 6]: Re-binding char #27 from [F_ViEndInsert] to
meta.
my /etc/inputrc file looks like this:
set meta-flag On
set input-meta On
set convert-meta Off
set output-meta On
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
#for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line
------------------------------
Date: Tue, 08 Aug 2000 09:31:34 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Re: about "syntax error" of perl program
Message-Id: <39900db1$0$50278$44a10c7e@news.net-link.net>
najura@my-deja.com wrote:
>
> Sub readpostInput()
> {My(%searchField,$buffer,$pair,@pairs);
I'm pretty sure your problem is here. 'My' should be 'my'.
perldoc -f my
In the future, you may wish to include
use diagnostics;
at the top of your code, especially when developing.
--
Jeff Boes |The number of computer scientists in
|jboes@eoexchange.com
Sr. S/W Engineer |a room is inversely proportional to |616-381-9889 ext
18
Change Technology|the number of bugs in their code. |616-381-4823 fax
EoExchange, Inc. |
|www.eoexchange.com
------------------------------
Date: Tue, 08 Aug 2000 13:58:29 GMT
From: "Kermit" <as@if.com>
Subject: Chess Game (Deep Blue) in Perl?
Message-Id: <9mUj5.135075$Gh.1792726@news20.bellglobal.com>
Hello All,
I have been thinking about this for a while and haven't come up with
anything, wondering if anyone here could help me out. Would it be possible
to develop a chess game with Perl? I have seen a few implementations that
allow two human players to play against each other through the perl script,
but that's not what I had in mind. I really want to create an actual game,
where you can play against the game (code).
I know this is possible with C++ (Because I have done it for three of the
chess pieces already), but is this possible in Perl?
If anyone has any advice or comments on the project, please let me know.
It's a personal challenge of mine to do it with something other then VB...
No offense.
Thanks All.
Deep Blue Wannabe
------------------------------
Date: 08 Aug 2000 14:25:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Chess Game (Deep Blue) in Perl?
Message-Id: <slrn8p061g.st1.abigail@alexandra.foad.org>
Kermit (as@if.com) wrote on MMDXXXIV September MCMXCIII in
<URL:news:9mUj5.135075$Gh.1792726@news20.bellglobal.com>:
\\ Hello All,
\\
\\
\\ I have been thinking about this for a while and haven't come up with
\\ anything, wondering if anyone here could help me out. Would it be possible
\\ to develop a chess game with Perl? I have seen a few implementations that
\\ allow two human players to play against each other through the perl script,
\\ but that's not what I had in mind. I really want to create an actual game,
\\ where you can play against the game (code).
There's no reason you can't do it in Perl. There are reasons Perl isn't
very suited for this though. Compared to C and C++, Perl is slow, and
very resource hungry.
Abigail
--
$_ = "\nrekcaH lreP rehtona tsuJ"; my $chop; $chop = sub {print chop; $chop};
$chop -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ()
-> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ()
------------------------------
Date: Sun, 6 Aug 2000 09:47:29 -0700
From: "ekkis" <SixteenPintsANight@Beer.com>
Subject: CPAN error...
Message-Id: <OFgj5.7$ik6.3563@news.pacbell.net>
this is making me crazy. I have two installations of Perl: 5.00503 and
5.6.0 (God knows why, my RedHat 6.2 came that way). CPAN seems confused at
to what is installed where since it looks in /root/.cpan and /tmp/cpan for
its info... if I run under the 5.00503 install I get:
-------------------------------------------------------
root@beowulf:/root # perl -MCPAN -e shell
Warning [/etc/inputrc line 6]: Re-binding char #27 from [F_ViEndInsert] to
meta.
cpan shell -- CPAN exploration and modules installation (v1.54)
ReadLine support enabled
cpan> b
Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
if you just type
install Bundle::libnet
Trying with "/usr/bin/lynx -source" to get
ftp://ftp.perl.org/pub/perl/CPAN/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Error reading from /tmp/cpan/sources/authors/01mailrc.txt:
cpan>
-------------------------------------------------------
I can "vi /tmp/cpan/sources/authors/01mailrc.txt" with no problem... and if
I try:
-------------------------------------------------------
cpan> install Bundle::libnet
Can't install Bundle::libnet, don't have an associated bundle file. :-(
at /usr/lib/perl5/5.00503/CPAN.pm line 1833
-------------------------------------------------------
help!
1,000 thanks (in advance) - ekkis
------------------------------
Date: Tue, 08 Aug 2000 12:39:02 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: date manipulation
Message-Id: <3991fe62.38666509@news.newsguy.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
>It's not just during those two years that it doesn't work. It will
>happen whenever the two dates are on different sides of the date/time
>when the hour shifts. The simple solutions simply add a whole multiple
>of 24 hours to the time.
(You mean "two hours" in the first sentence.) The problems
we've been talking about are calculating dates, not times, so I
think it is only those two hours that are affected (which is not
to say that I think the problem should be ignored). But if you
were calculating a time, then certainly it would be more
important to take summer time into account, as you say.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 08 Aug 2000 14:29:22 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Embedded spaces in arrays
Message-Id: <slrn8p069e.st1.abigail@alexandra.foad.org>
Steve Leibel (stevel@bluetuna.com) wrote on MMDXXXIV September MCMXCIII
in <URL:news:stevel-0708002302420001@192.168.100.2>:
:: Can someone kindly point me to the fine print that explains the output of
:: this program:
::
:: #!/usr/local/bin/perl -w
:: use strict;
::
:: my @fish = ("tuna", "salmon");
:: print @fish, "\n";
:: print "@fish", "\n";
::
:: The output is
::
:: tunasalmon
:: tuna salmon
::
:: In other words, interpolating an array in double quotes causes spaces to
:: appear between the elements. Why is that?
man perlvar
Abigail
--
:$:=~s:$":Just$&another$&:;$:=~s:
:Perl$"Hacker$&:;chop$:;print$:#:
------------------------------
Date: 08 Aug 2000 14:33:26 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Expert advise needed
Message-Id: <slrn8p06h1.st1.abigail@alexandra.foad.org>
Denys Kotseba (kdl@softhome.net) wrote on MMDXXXIV September MCMXCIII in
<URL:news:8moqt3$rpp$1@app0.visti.net>:
.. Hello,
..
.. My boss got the idea to develop an application (potentially for sale) which
.. would allow people with no technical knowledge create a web-shop. It would
.. be running on server and accessed though a regular browser. I feel Perl is a
.. good tool for this kind of task. He doesn't like the idea of writing it in
.. Perl because we would have to give out the source code. My question is: what
.. is the best solution to make the whole system somehow protected? (I know
.. it's the age of open source and the concept of hiding source code is strange
.. to Perl, but still ;) I thought combining a core in C and the rest in Perl
.. would solve the question, but I would like to hear other opinions.
Ask your boss whether he's a criminal himself, who illegally copies
books, CDs and dollar bills. If he isn't, ask him why he assumes your
customers are.
Just because you deliver source doesn't mean you grant them the right to
distribute it, or even reuse part of the code.
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: Tue, 08 Aug 2000 15:38:14 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: Expert advise needed
Message-Id: <39901B56.A43AFEB4@yahoo.co.uk>
Denys Kotseba wrote:
> Hello,
>
> My boss got the idea to develop an application (potentially for sale) which
> would allow people with no technical knowledge create a web-shop. It would
> be running on server and accessed though a regular browser. I feel Perl is a
> good tool for this kind of task. He doesn't like the idea of writing it in
> Perl because we would have to give out the source code. My question is: what
> is the best solution to make the whole system somehow protected? (I know
> it's the age of open source and the concept of hiding source code is strange
> to Perl, but still ;) I thought combining a core in C and the rest in Perl
> would solve the question, but I would like to hear other opinions.
>
> Thanks.
>
> Denys Kotseba
perlfaq3 contains the question "How can I hide the source for my Perl program".
In summary: You can't. Put a tough license on it.
------------------------------
Date: Tue, 08 Aug 2000 15:40:28 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: Expert advise needed
Message-Id: <39901BDC.10695D13@yahoo.co.uk>
Denys Kotseba wrote:
> My boss got the idea to develop an application (potentially for sale) which
> would allow people with no technical knowledge create a web-shop.
[snip]
> He doesn't like the idea of writing it in
> Perl because we would have to give out the source code.
To people with no technical knowledge, though, right?
------------------------------
Date: 08 Aug 2000 14:34:00 GMT
From: abigail@foad.org (Abigail)
Subject: Re: function like grep
Message-Id: <slrn8p06i4.st1.abigail@alexandra.foad.org>
unplug (unplug@poboxes.com) wrote on MMDXXXIV September MCMXCIII in
<URL:news:398FD2F3.FAC921B1@poboxes.com>:
## Does perl has any function like grep??
Not at all. You're such a smart guy to not be fooled by the manual!
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
------------------------------
Date: Tue, 08 Aug 2000 14:54:38 +0100
From: Wayne Keenan <tripix@metaverse.fsnet.co.uk>
Subject: Re: Game programming in perl...?
Message-Id: <3990111E.E166275@metaverse.fsnet.co.uk>
Adam Trace Spragg wrote:
<snip>
>
> I'm wondering if anyone else is working on any such game-type projects in
> Perl. I'd be interested to hear what you're up to...
>
> Adam
Well, its not quite what your after, but, gratuitous plug, I'm currenlty
working on
the perl bindings for SDL (www.libsdl.org) a cross platform game library.
I have not yet written the example game yet, but I have written some
scroller demos (think 8bit (i.e. commodore 64) demos) to exercise it a bit.
You may be asking where's the relevance, but have a look at this snippet from
scroller4.pl:
#create 32 bit RGBA surface from perl string
sub create_surface_from_string
{
my ($bitmap_width, $bitmap_height, $bitmap_data)=@_;
my $bitmap_size=length $bitmap_data;
my $bitmap= new OpenGL::Array $bitmap_size, GL_UNSIGNED_INT;
$_bitmaps->{$_bitmap_id++}= $bitmap; #keep that thang alive!
$bitmap->assign_data(0, $bitmap_data);
my $surf = new SDL::Surface( -from => $bitmap->ptr(),
-width => $bitmap_width,
-height => $bitmap_height,
-depth => 32 ,
-pitch => $bitmap_width*4
);
return $surf;
}
#note the open GL stoof just provides Perl script level access to 'lowlevel'
#memory addresses which are passed off to other XS libs (SDL Perl in this case),
#no 'real' OpenGL is used.
Enough brain candy to get you thinking? (parse portions of marked up e-mail to
RGB images f.e)
Available from all good http://www.metaverse.fsnet.co.uk/sdlpl/
btw, that snippet came from the 'code2html' generated file (no pictures):
http://www.metaverse.fsnet.co.uk/sdlpl/screenshots/scroller4.html
All the best
Wayne
------------------------------
Date: Tue, 08 Aug 2000 15:32:02 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: get files from other servers
Message-Id: <399019E2.DCA80465@yahoo.co.uk>
"Louie G. Kim" wrote:
> Is there any way to get files from other servers?
>
> When i am on server A, I want to get fileA from server B or
> I want to display fileA at server B.
>
> GK
Ah, peer-to-peer file sharing. Have you tried Napster?
------------------------------
Date: 08 Aug 2000 09:34:37 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: get files from other servers
Message-Id: <8766pbes8y.fsf@limey.hpcc.uh.edu>
>> On Fri, 4 Aug 2000 18:22:14 +0900,
>> "Louie G. Kim" <gk@bncol.com> said:
> Is there any way to get files from other servers? When
> i am on server A, I want to get fileA from server B or I
> want to display fileA at server B.
Far, far too vague. More details please!
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Tue, 08 Aug 2000 15:35:14 +0200
From: Eddie Nolan <edmond.nolan@primus-online.de>
Subject: get temporary file name?
Message-Id: <39900C92.2A20DDC2@primus-online.de>
Hi,
Is there a PERL function which will return a
unique filename? Maybe something similar to
tempnam?
Thanks in advance,
Eddie
------------------------------
Date: 8 Aug 2000 15:52:02 +0100
From: andkaha@hello.to.REMOVE (Andreas Kahari)
Subject: Re: get temporary file name?
Message-Id: <39901082@merganser.its.uu.se>
In article <39900C92.2A20DDC2@primus-online.de>,
Eddie Nolan <edmond.nolan@primus-online.de> wrote:
>Hi,
>
>Is there a PERL function which will return a
>unique filename? Maybe something similar to
>tempnam?
>
>Thanks in advance,
>
>Eddie
>
It's in the FAQ, see perlfaq5, "How do I make a temporary file name?".
/A
--
# Andreas Kähäri, <URL:http://hello.to/andkaha/>.
# ...brought to you from Uppsala, Sweden.
# All junk e-mail is reported to the appropriate authorities.
# Criticism, cynicism and irony available free of charge.
------------------------------
Date: Tue, 08 Aug 2000 16:27:40 +0200
From: Eddie Nolan <edmond.nolan@primus-online.de>
Subject: Re: get temporary file name?
Message-Id: <399018DC.274791D9@primus-online.de>
thanks!
Andreas Kahari wrote:
> In article <39900C92.2A20DDC2@primus-online.de>,
> Eddie Nolan <edmond.nolan@primus-online.de> wrote:
> >Hi,
> >
> >Is there a PERL function which will return a
> >unique filename? Maybe something similar to
> >tempnam?
> >
> >Thanks in advance,
> >
> >Eddie
> >
>
> It's in the FAQ, see perlfaq5, "How do I make a temporary file name?".
>
> /A
>
> --
> # Andreas Kähäri, <URL:http://hello.to/andkaha/>.
> # ...brought to you from Uppsala, Sweden.
> # All junk e-mail is reported to the appropriate authorities.
> # Criticism, cynicism and irony available free of charge.
------------------------------
Date: Tue, 08 Aug 2000 12:31:01 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Have split question
Message-Id: <398ffc1c.38084849@news.newsguy.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
>Or, using tr///, you can delete ALL parantheses:
>
> ($num = $line) =~ tr/\(\)//d;
>
>(Note: despite the similar syntax, tr/// does not use regular
>expressions)
And therefore it's not necessary to escape the parentheses:
($num = $line) =~ tr/()//d;
As usual, the original poster's specification is too vague
for us to know, but my interpretation is that he might want
something like this:
($num) = $line =~ /\((.*?)\)/;
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 08 Aug 2000 14:36:34 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Have split question
Message-Id: <slrn8p06mu.st1.abigail@alexandra.foad.org>
Johnny Shaieb (jshaieb@wcg.net) wrote on MMDXXVIII September MCMXCIII in
<URL:news:Pine.SOL.3.96.1000801202426.26875C-100000@mail>:
,,
,, If I have the following line to parse,,, how do I get what's in the
,, middle.
,,
,, $line = "(945)";
,,
,, #I now I can do this
,, ($tmp1,$num,$tmp2) = split(/\(,\)/,$line);
Really? I don't think that does what you think it does.
,, #but how do I rip out whats in the middle, without using the above
,, #line.
Just use a regex matching what you want to extract.
($middle_digit) = $line =~ /4/g; # Matches the 4, which is in the middle.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54";
print if s/<<EOT/<<EOT/e;
Just another Perl Hacker
EOT
------------------------------
Date: Sat, 5 Aug 2000 19:55:16 -0700
From: "ekkis" <SixteenPintsANight@Beer.com>
Subject: Re: Help with LWP
Message-Id: <Ct4j5.510$LD4.47982@news.pacbell.net>
I seem unable to install the LWP bundle though at present am not even sure
whether it is already installed....
the "b" command issued at: "perl -MCPAN -e shell" reveals:
Bundle Bundle::LWP (G/GA/GAAS/libwww-perl-5.48.tar.gz)
however, I'm not able to find an LWP directory in any of the @INC
directories and cannot "use" it...
the error message I'm getting from "make test" follows. any help would be
greatly appreciated, I'm running RedHat 6.2 with Perl 5.6.0 for i586-linux
1,000 thanks - e
base/ua.............ok
html/form...........ok
robot/rules-dbm.....ok
robot/rules.........ok
robot/ua............NOK 2HTTP Server terminated
robot/ua............NOK 7FAILED tests 1-3, 5, 7
Failed 5/7 tests, 28.57% okay
local/autoload......ok
local/get...........ok
local/http..........NOK 8Can't call method "is_redirect" on an undefined
value at local/http.t line 188, <DAEMON> line 1.
HTTP Server terminated
local/http..........dubious
Test returned status 113 (wstat 28928, 0x7100)
DIED. FAILED tests 1-18
Failed 18/18 tests, 0.00% okay
local/protosub......ok
Failed Test Status Wstat Total Fail Failed List of failed
----------------------------------------------------------------------------
---
local/http.t 113 28928 18 18 100.00% 1-18
robot/ua.t 7 5 71.43% 1-3, 5, 7
Failed 2/22 test scripts, 90.91% okay. 23/284 subtests failed, 91.90% okay.
make: *** [test] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
Bundle summary: The following items in bundle Bundle::LWP had installation
problems:
LWP
"Christopher Thorjussen" <kernel@start.no> wrote in message
news:8mddmm$rio$1@snipp.uninett.no...
> Try using CPAN and install the LWP bundle :)
>
> perl -MCPAN -e shell
> ->install Bundle::LWP
>
>
> -Christopher Thorjussen
>
>
>
> "Jeffrey" <seesej@uswest.net> wrote in message
> news:B5AC1473.81AF%seesej@uswest.net...
> > Hi:
> > I am trying to use the LWP:UserAgent module and I am having the
following
> > problem.
> >
> > I am getting a code 500 back from any url that I try, but this script
will
> > run correctly from my desktop computer.
> >
> > When I try to get message (ok,server error,etc) I get an execution error
> > from the "message" object
> >
> > "Can't locate auto/URI/URL/http/path_query.al in @INC............."
> >
> > Problem is I can't find path_query.al anywhere.
> >
> > My first question is. Why am I getting the code 500 in the first place?
> > Secondly, what is the path_query.al and if I need it where can I get it.
> >
> > Thank you in advance for any help
> > Jeff
> >
> > I am using Perl5 on Red Hat Linux release 6.2 with Apache.
> >
> > Here is an excerpt of the code I am attempting to use.
> >
> > ######################################################
> > # Create a user agent object
> > use LWP::UserAgent;
> >
> > $ua = new LWP::UserAgent();
> > $request = new HTTP::Request('GET','http://www.excite.com/');
> > $result = $ua->request($request);
> >
> > $content = "\ncode .....: ".$result->code;
> > $content .= "\nmessage ..: ".$result->message;
> > $content .= "\ncontent ..: \n".$result->content;
> >
> > print $content;
> > ######################################################
> >
>
>
------------------------------
Date: Sun, 6 Aug 2000 09:04:28 -0700
From: "ekkis" <SixteenPintsANight@Beer.com>
Subject: Re: How to capture CGI program .exe output, modify it and then pass back to browser (client)
Message-Id: <t1gj5.3$ik6.1689@news.pacbell.net>
try a package called LWP (if you don't already have it, you can install it
with the CPAN module: install Bundle::LWP). it comes with a module called
Simple that provides a simple interface for such things. with it you could
call the URL you mention, capture its output and do anything you like with
it.
- e
<barrybx@my-deja.com> wrote in message news:8mg0d8$q00$1@nnrp1.deja.com...
> Hi All,
>
> I'm a CGI dummy. This is a lengthy question, I really hope someone can
help
> (save) me.
>
> I have a CGI program with no source code, i.e. cgiprogram.exe.
>
> The arguments pass to the cgi program must use post method, like the
> following:
>
> <form action=http://www.dummy.net/cgiprogram.exe method=post>
> <input name=par1 value=val1>
> <input name=par2 value=val2>
> ...
> </form>
>
> The output of the cgi program is directly return the browser (client). The
> format of the output is binary Content-Transfer-Encoding and the
> Content-type: text/html, i.e. somewhat like a binary html.
>
> I need to run the cgi program, get value from the output and redirect the
> output (data) to another url (html page).
>
> That means:
>
> Originally,
> cgiprogram -> output -> browser
>
> Intented to,
> cgiprogram -> output -> another cgi program -> browser
>
> Do I need to write something like a cgi proxy program (that a big project
to
> me), or somewhat like a filter ?
>
> My main concern is how can I get the binary html data and redirect it to a
> cgi program instead of printing to browser directory.
>
> Could anybody kindly give me some advice or suggestion?
>
> Recommended booklist or examples are welcomed.
>
> Thanks.
>
> Hope someone can understand my words.
>
> Best Regards,
> Barry
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Tue, 08 Aug 2000 13:03:28 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Need help!!
Message-Id: <399804b5.40285578@news.newsguy.com>
Marco Natoni <foo@bar.va> wrote:
> Yes, it is possible: The diamond operator (<>) reads from each of the
>files specified in the command line of the script or from the standard
>input if the command line is empty. Note that in this way it is very
>hard to save the content of your program performance in the same file
>where the input has been read.
Unless you use the -i command-line switch, often in combination
with -n or -p. See perlrun in the docs.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Tue, 8 Aug 2000 16:14:04 +0200
From: "sysadmin" <sysadmin@tbkcoders.com>
Subject: newbie hash type question.
Message-Id: <lBUj5.14$qP5.245@news.ecrc.de>
I'm just getting into perl and often fall down on basic theory, I wouldn't
mind some help....
My question:-
I have a scalar:-
$myscalar = "router1";
I would like to create a hash with the name "router1".
ie
my %router1;
How would I go about this?
At the moment, I'm running into problems where by Perl thinks I'm trying to
dereference
references ie,
my %$myscalar
and I get the usual erros about "not being able to localize through a
reference" etc.
d.
------------------------------
Date: Tue, 08 Aug 2000 14:15:41 GMT
From: windywisconsin@my-deja.com
Subject: OT FS: PerlServices.com Domain Name
Message-Id: <8mp4ma$pk$1@nnrp1.deja.com>
The Domain name 'PerlServices.com' is for sale. I no longer have the
time to support the site. The site and scripts also will accompany it
(and the traffic that it draws) if you wish. If interested, please
make an offer. Best offer will take it!
Offers can be sent to domain@perlservices.com.
Thanks!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 08 Aug 2000 14:15:12 GMT
From: Joel Nelson <joelnelson@home.net>
Subject: Re: Perl on Windows - how to keep the window
Message-Id: <399015D1.A751ACF6@home.net>
Eric Titmas wrote:
> I wrote a little perl program on my PC yesterday
> and it worked fine.
>
> My problem was the DOS window that perl ran in
> disappeared as soon as the program completed -
> I couldn't read the terminal output.
>
> How do I get the window to stay up? (I worked around
> this by having the program read a line from the terminal.)
If you're running the script from an icon, change the properties so that
the 'Target' says something like 'command.com /k c:\mydir\myscript.pl'.
This causes the DOS shell to start, run your program and then continue
to run the DOS shell. Otherwise DOS shell will start, run your program
and then exit the DOS shell.
This is obviously not a perl problem but an OS issue!
Joel
------------------------------
Date: 08 Aug 2000 09:00:39 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Pop Ups
Message-Id: <87bsz3ettk.fsf@limey.hpcc.uh.edu>
>> On Mon, 7 Aug 2000 17:08:34 +0100,
>> "Nick Gushlow" <nick.gushlow(@)usa.net> said:
> Help. Can anybody tell me how to invoke alert windows?
> Basically I have a form page, and if the user doesn't
> fill in required information I want a little alert box
> to pop up and inform them so and send them back to the
> page to fill out the details they missed.
perldoc -f alarm
perldoc Curses
(your question is ambiguous, please supply more
information about the context in which you are using it.)
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Tue, 08 Aug 2000 14:36:11 GMT
From: Joel Nelson <joelnelson@home.net>
Subject: Re: Pop Ups
Message-Id: <39901ABC.A7034E45@home.net>
Nick Gushlow wrote:
> Help.
>
> Can anybody tell me how to invoke alert windows?
> Basically I have a form page, and if the user doesn't fill in required
> information I want a little alert box to pop up and inform them so and send
> them back to the page to fill out the details they missed.
Hmmm, sounds like your asking a web question. If that is the case then look in
a javascript newsgroup!
Joel
------------------------------
Date: Tue, 08 Aug 2000 14:36:16 GMT
From: Joel Nelson <joelnelson@home.net>
Subject: Re: Pop Ups
Message-Id: <39901AC2.70F72503@home.net>
Nick Gushlow wrote:
> Help.
>
> Can anybody tell me how to invoke alert windows?
> Basically I have a form page, and if the user doesn't fill in required
> information I want a little alert box to pop up and inform them so and send
> them back to the page to fill out the details they missed.
Hmmm, sounds like your asking a web question. If that is the case then look in
a javascript newsgroup!
Joel
------------------------------
Date: Tue, 08 Aug 2000 14:37:24 GMT
From: Joel Nelson <joelnelson@home.net>
Subject: Re: Pop Ups
Message-Id: <39901B06.F19D7396@home.net>
Nick Gushlow wrote:
> Help.
>
> Can anybody tell me how to invoke alert windows?
> Basically I have a form page, and if the user doesn't fill in required
> information I want a little alert box to pop up and inform them so and send
> them back to the page to fill out the details they missed.
Hmmm, sounds like your asking a web question. If that is the case then look in
a javascript newsgroup!
Joel
------------------------------
Date: Tue, 08 Aug 2000 09:08:20 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Re: Programming Ethics
Message-Id: <399006a9$0$50271$44a10c7e@news.net-link.net>
jthornton@my-deja.com wrote:
>
> Many of you have experienced this situation -- your employer (or
> contractor) asks you to write a program that, from your point-of-view,
> can lead to no good.
While I have no words of wisdom to add to this thread, I'm proud to say
that my alma mater anticipated these sorts of moral dilemmas two or more
decades back.
I attended tiny Hope College in Holland, MI [1]. I graduated in
19-mumble, okay, 1978. A requirement to graduate was to take a freshman
philosophy class (legendary for its brain draining difficulty); yeah,
even us computer science and physics majors had to take it. This class
opened our innocent eyes to issues of morality as something a bit more
than just "I feel this is wrong" or "Why shouldn't I? It doesn't hurt
anyone (I know)."
But a second requirement was to take a senior seminar class, taught
(still! [2]) in various departments with different titles but all having
a similar theme. How are you going to take this dangerous knowledge
which we have imparted unto you in the last four years, and use it
wisely? My Senior Sem was taught by a chemistry professor of some two
dozen years experience at Hope, and it was all about Science and Human
Values. We talked about many subjects: what if you are asked to design
or work on weapons systems? (In fact, three years later I was working
for a defense contractor, but thankfully not on weapons systems.) What
if your work in biological research could be turned to developing
biological weapons? We even dealt with privacy concerns and computers,
although at that time the issue was more of huge private databases of
credit history, medical history, criminal records and the like--the
concept of spam and the Internet was not even a gleam in someone's eye.
I'm proud of the education I got there. Perhaps I didn't have the chance
to participate in ground-breaking research. Perhaps the computer on
which I learned to program was a bit behind the times (but then any
knowledge of programming gained by someone at a big state university at
that same time is most certainly just as obsolete now as mine became).
Perhaps none of my professors won the Nobel Prize (but many were
published; the Comp Sci department chairman was [2] and still is
well-known in the field of computers and education.
[1] http://www.hope.edu/
[2] http://www.hope.edu/academic/ids/ssdescri.html
[3] http://www.cs.hope.edu/~dershem/hld/vita.html
--
Jeff Boes |The number of computer scientists in
|jboes@eoexchange.com
Sr. S/W Engineer |a room is inversely proportional to |616-381-9889 ext
18
Change Technology|the number of bugs in their code. |616-381-4823 fax
EoExchange, Inc. |
|www.eoexchange.com
------------------------------
Date: Sun, 6 Aug 2000 08:59:33 -0700
From: "ekkis" <SixteenPintsANight@Beer.com>
Subject: Re: reg expressions - protect html
Message-Id: <TYfj5.1$ik6.1619@news.pacbell.net>
it's difficult to write RE to do such things... try using an HTML parser
"indiziert" <indiziert@unabomber.de> wrote in message
news:398B7D2A.D155820B@unabomber.de...
> hi
>
> hm well
>
> i wrote a script that replaces certain characters by numbers e.g Hello -
> H3ll0
>
> i was figuring out how to translate html pages with it. but the script
> translated even the html tags, so that there were no html code.
> if i translate a html page you can see:
> <H7M1> instead of <HTML> because a T is translated to 7 and an L to 1.
> so how can i protect html tags from being translated ?
>
> i need someting that keeps html tags but still changes characters
>
> thanx in advance
> indiziert
>
------------------------------
Date: Tue, 08 Aug 2000 09:36:33 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: reg expressions - protect html
Message-Id: <39901AF1.33BF0847@rac.ray.com>
"Godzilla!" wrote:
>
> Excellent point Bearded One. I have a beard as well but I
> am certain there are those here who would be offended should
> I display my well cropped beard, at least well cropped during
> hot Summer months.
>
He felte a thyng al rough and long yherd,
And seyde, "Fy! allas! what have I do?"
"Tehee !" quod she, and clapte the wyndow to,
And Absolon gooth forth a sory pas.
"A berd! a berd!" quod hende Nicholas,
"By Goddes corpus, this goth faire and weel."
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: 07 Aug 2000 22:08:32 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Regular Expressions & Substitution
Message-Id: <m3k8dscuvj.fsf@dhcp11-177.support.tivoli.com>
"Tom Ford" <fordt@uci.edu> writes:
[snip]
> Can you use those in the actual regular expression? I thought within the
> regex you used the \1, \2 version, and afterwords the $1, $2, or does that
> only apply to the LHS?
[snip]
It only applies to the LHS. (It still works on the RHS, but is deprecated.)
--
Ren Maddox
ren@tivoli.com
------------------------------
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 3948
**************************************