[21736] in Perl-Users-Digest
Perl-Users Digest, Issue: 3940 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 9 14:11:52 2002
Date: Wed, 9 Oct 2002 11:05:12 -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 Wed, 9 Oct 2002 Volume: 10 Number: 3940
Today's topics:
Re: "my" a reserved word? <krahnj@acm.org>
Re: 96-column punched-card data <mbudash@sonic.net>
Hash question <lois@hotmail.com>
Re: Hash question <pinyaj@rpi.edu>
Re: Hash question <Graham.T.Wood@oracle.com>
Re: Hash question <danb@mail.dnttm.ro>
Re: Hash question <krahnj@acm.org>
Re: Hash question (John J. Chew III)
Re: ithreads, perl 5.8 and shared objects <nospam-abuse@ilyaz.org>
Re: ithreads, perl 5.8 and shared objects <nospam-abuse@ilyaz.org>
Re: ithreads, perl 5.8 and shared objects <uri@stemsystems.com>
Multiple Pings/Second <binabik1@mail.com>
Re: Multiple Pings/Second (Si Ballenger)
Re: newbie with datatype prob <jeff@vpservices.com>
Re: NEWBIE: Accessing FORM input with PERLSCRIPT <flavell@mail.cern.ch>
Re: NEWBIE: Accessing FORM input with PERLSCRIPT <tennant2NOSPAM@theforge.demon.co.uk>
Newbie: Simple but GOOD form handler - WHERE? <newsgroups@vendel.info>
Question about scope. <rubberducky703@hotmail.com>
Win32::OLE with IIS metabase <add@nrcan.gc.ca>
Re: XML::RSS bug (kellan)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 09 Oct 2002 17:44:24 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: "my" a reserved word?
Message-Id: <3DA46AE1.B3D6C5B5@acm.org>
Chuck Goldstein wrote:
>
> Used find2perl translator in version 5.6.1 (Win32) on a
> simple 'find' for instructional purposes. The resulting
> Perl code included a subroutine doexec:
> sub doexec {
> my $ok = shift;
> for my $word (@_)
> { $word =~ s#{}#$name#g }
> ...
> return !$?;
> }
>
> The 'my' looks like a similar construct from C++ but I can't
> find any documentation on it. Any help in pointing me in
> the right direction wrt to documentation? Am a newbie at
> Perl and, apparaently, haven't found my way to the right
> docs.
my() is listed in the perlfunc document that is installed with Perl. To
get help on Perl's builtin functions type this on the command line:
perldoc -f my
To list the complete perlfunc document:
perldoc perlfunc
For an intro and a list of the other documents:
perldoc perl
For information on how to use the perldoc program:
perldoc perldoc
John
--
use Perl;
program
fulfillment
------------------------------
Date: Wed, 09 Oct 2002 17:53:18 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: 96-column punched-card data
Message-Id: <mbudash-DC8906.10531809102002@typhoon.sonic.net>
In article <3DA346A0.7AFC7240@earthlink.net>,
Benjamin Goldberg <goldbb2@earthlink.net> wrote:
> Robert Brooks wrote:
> >
> > Subject: 96-column punched-card data
> >
> > Have you ever seen a 96-column card, the IBM 3700?
> > It's 3.25" x 2.625" and holds three rows of 32
> > characters for a total of 96.
> >
> > If that isn't odd enough, when the card reader
> > transmits the data to memory, the data comes in-
> > in this order:
> >
> > 1 33 65 2 34 66 . . . 32 64 96
> >
> > The job is to rearrange these 96 characters into
> > the correct order, 1 2 3 ... 94 95 96. On an
> > IBM mainframe, this takes one instruction,
> > TRANSLATE.
> >
> > How cheaply, efficiently, cleverly can Perl
> > do this job? My first pass was to just
> > emulate the TRANSLATE instruction. Works OK,
> > but surely Perl can do this without even
> > taking a deep breath.
> >
> > Anybody game to show what Perl can do?
>
> There may be more efficient ways to do it, but here's my go:
>
> #!perl -ln
> use integer;
> use constant TRANSLATE =>
> (map $_ * 3 + 0, 0..31),
> (map $_ * 3 + 1, 0..31),
> (map $_ * 3 + 2, 0..31);
> print +(split //)[TRANSLATE];
> __END__
> [untested]
interesting... you can sure see where my programming's coming from in my
solution:
$_='1 5 9 2 6 10 3 7 11 4 8 12';
$rows=3;
$cols=4;
for $i (0..($rows-1)) {
for $j (0..($cols-1)) {
push @cols, $i + ($j * $rows);
}
}
@final = (split /\s+/)[@cols];
print "@final\n";
yields:
1 2 3 4 5 6 7 8 9 10 11 12
------------------------------
Date: Wed, 09 Oct 2002 16:17:31 GMT
From: "Lois" <lois@hotmail.com>
Subject: Hash question
Message-Id: <vEYo9.26336$ST4.59329@rwcrnsc53>
Hi all,
I am thinking of implementing hash with primary and secondary key.
$city{California}{"San Jose"}=12;
$city{California}{"Los Angeles"}=3;
$city{Texas}{Austin}=5;
My guess was, it's similar to this form, but it didn't work
%city = { ("California", "San Jose") => 12,
("California", "Los Angeles") => 3,
("Texas", "Austin") => 5 };
What's the correct way of showing PK and SK in this form.
Thanks,
lois
------------------------------
Date: Wed, 9 Oct 2002 12:53:38 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Lois <lois@hotmail.com>
Subject: Re: Hash question
Message-Id: <Pine.A41.3.96.1021009125159.49858A-100000@vcmr-104.server.rpi.edu>
[posted & mailed]
On Wed, 9 Oct 2002, Lois wrote:
>$city{California}{"San Jose"}=12;
>$city{California}{"Los Angeles"}=3;
>$city{Texas}{Austin}=5;
>
>My guess was, it's similar to this form, but it didn't work
>
>%city = { ("California", "San Jose") => 12,
> ("California", "Los Angeles") => 3,
> ("Texas", "Austin") => 5 };
>What's the correct way of showing PK and SK in this form.
First of all, it'd be %city = (...), and not %city = {...}.
%city = (
California => { # notice HERE we use {...}
'San Jose' => 12,
'Los Angeles' => 3,
},
Texas => {
Austin => 5,
},
);
This is a hash of hash references.
perldoc perlreftut
perldoc perlref
perldoc perllol
--
Jeff "japhy" Pinyan RPI Acacia Brother #734 2002 Acacia Senior Dean
"And I vos head of Gestapo for ten | Michael Palin (as Heinrich Bimmler)
years. Ah! Five years! Nein! No! | in: The North Minehead Bye-Election
Oh. Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)
------------------------------
Date: Wed, 09 Oct 2002 17:54:37 +0100
From: Graham Wood <Graham.T.Wood@oracle.com>
Subject: Re: Hash question
Message-Id: <3DA45F4D.C778F1A1@oracle.com>
Lois wrote:
> Hi all,
>
> I am thinking of implementing hash with primary and secondary key.
> $city{California}{"San Jose"}=12;
> $city{California}{"Los Angeles"}=3;
> $city{Texas}{Austin}=5;
>
> My guess was, it's similar to this form, but it didn't work
>
> %city = { ("California", "San Jose") => 12,
> ("California", "Los Angeles") => 3,
> ("Texas", "Austin") => 5 };
> What's the correct way of showing PK and SK in this form.
>
> Thanks,
> lois
Here's one way. perldoc perldsc is good for this information.
%city=(
"California" => {
"San Jose" => 12,
"Los Angeles" => 3
},
"Texas" => {
"Austin" => 5
}
);
foreach $state (keys(%city)){
foreach $city (keys(%{$city{$state}})){
print "$state - $city -> $city{$state}{$city}\n";
}
}
Graham Wood
------------------------------
Date: Wed, 9 Oct 2002 19:50:21 +0200
From: "Dan Borlovan" <danb@mail.dnttm.ro>
Subject: Re: Hash question
Message-Id: <ao1mo6$r9a$1@nebula.dnttm.ro>
> My guess was, it's similar to this form, but it didn't work
>
> %city = { ("California", "San Jose") => 12,
> ("California", "Los Angeles") => 3,
> ("Texas", "Austin") => 5 };
%city = (
'California' => {'San Jose' => 12, 'Los Angeles' =>3},
'Texas' => {'Austin' => 5}
);
Each PK has as its value a hash reference (SK=>value)
Dan
------------------------------
Date: Wed, 09 Oct 2002 17:03:20 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Hash question
Message-Id: <3DA46141.FD3429C0@acm.org>
Lois wrote:
>
> I am thinking of implementing hash with primary and secondary key.
> $city{California}{"San Jose"}=12;
> $city{California}{"Los Angeles"}=3;
> $city{Texas}{Austin}=5;
>
> My guess was, it's similar to this form, but it didn't work
>
> %city = { ("California", "San Jose") => 12,
> ("California", "Los Angeles") => 3,
> ("Texas", "Austin") => 5 };
> What's the correct way of showing PK and SK in this form.
my %city = ( California => { 'San Jose' => 12,
'Los Angeles' => 3,
},
Texas => { Austin => 5,
},
);
John
--
use Perl;
program
fulfillment
------------------------------
Date: 9 Oct 2002 17:00:02 GMT
From: jjchew@coxeter.math.toronto.edu (John J. Chew III)
Subject: Re: Hash question
Message-Id: <ao1nai$l1n$1@news.math.toronto.edu>
In article <vEYo9.26336$ST4.59329@rwcrnsc53>, Lois <lois@hotmail.com> wrote:
> I am thinking of implementing hash with primary and secondary key.
> $city{California}{"San Jose"}=12;
> $city{California}{"Los Angeles"}=3;
> $city{Texas}{Austin}=5;
>
> My guess was, it's similar to this form, but it didn't work
>
> %city = { ("California", "San Jose") => 12,
> ("California", "Los Angeles") => 3,
> ("Texas", "Austin") => 5 };
> What's the correct way of showing PK and SK in this form.
You'd think that if you can write
$city{'California','San Jose'} = 12;
you ought to be able to write
%city = ( ('California','San Jose') => 12 );
but instead you have to write (see man perlvar(1))
%city = ("California$;San Jose" => 12);
or if you want to use a nested hash (not a bad idea, if you want to
be able to find all the cities in California without iterating over
all the cities in your dataset):
%city = (
'California' => { 'San Jose' => 12, 'Los Angeles' => 3 },
'Texas' => { 'Austin' => 5 },
);
while (my ($city, $n) = each %{$city{'California'}}) { print "$city $n\n"; }
Note that it's "%city = ()" to specify a list of initial key-value pairs
and not "%city = {}" to incorrectly try to assign a reference to such a
list as a key and nothing as the corresponding value.
I myself would probably write something like:
my %city_to_data;
my %state_to_cities;
for my $line (split(/\n/, <<"EOS")) {
San Jose|California|12
Los Angeles|California|3
Austin|Texas|5
EOS
$line =~ s/^\s+//;
my ($city, $state, $n) = split(/\|/, $line);
my %data = ('city' => $city, 'state' => $state, 'n' => $n);
$city_to_data{$city,$state} = \%data;
push(@{$state_to_cities{$state}}, \%data);
}
print "$city_to_data{'Austin','Texas'}{'n'}\n";
for my $d (@{$state_to_cities{'California'}}) { print "$d->{'city'}\n"; }
John
--
John Chew (poslfit on MD/WD/PD)
jjchew@math.utoronto.ca * http://www.math.utoronto.ca/jjchew
------------------------------
Date: Wed, 9 Oct 2002 17:24:50 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: ithreads, perl 5.8 and shared objects
Message-Id: <ao1op2$1man$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Uri Guttman
<uri@stemsystems.com>], who wrote in article <x7n0ppxyjr.fsf@mail.sysarch.com>:
> IZ> Oh, get real! There is *absolutely* no way to marry several event
> IZ> loops which use different IPC mechanisms - unless your OS supports
> IZ> waiting on both kinds of events. Try to wait on a semaphore *or* on
> IZ> file-being-readable (without using the threads). Even using the
> IZ> threads this requires ugly hacks. (I did it for Tk event loop on OS/2
> IZ> - which can wait on GUI events together with select(). Ugly...)
>
> that isn't what he is saying. poe can piggyback on several other
> existing event loop systems (e.g. tk) and not use its own one. there is
> no need to merge two complete event loop systems.
Says who? This need arises right and left. OK, so POE can use an
externally supplied event loop. But this does not scale: you cannot
simultaneously use two modules each of which wants to overwrite the
loop. There is no way to *subclass* an existing loop.
> IZ> Now suppose two modules - which do not know about each other - try to
> IZ> subclass select(). How would they do it?
>
> again, that is not relevant. only one module should ever do the core
> select calls.
Nonsense. What you describe is the *current implementation* of event
loops (probably of POE only); you want to force it down the user
throats as if it were what they *want*.
The need to subclass an existing event loop is real. This task
(designing a subclassable event loop core) is extremely hard.
However, that the problem is hard to solve does not make the problem
disappear.
Ilya
P.S. What I've heard is that Win32 is very good w.r.t. event loops.
You can wait on a wide combination of heterogeneous events.
E.g., this is not so on OS/2; there are two kinds of semaphores,
and (IIRC) 3 kinds of queues. You cannot wait on a combination
of events of different kinds (one is forced to joggle with
several threads waiting on homogeous stuff - but threads are
considered as a SMoP).
Unix is yet more primitive in this respect - you are forced to
use pipes if you want any interleaving...
------------------------------
Date: Wed, 9 Oct 2002 17:45:42 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: ithreads, perl 5.8 and shared objects
Message-Id: <ao1q06$1mqo$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Benjamin Goldberg
<goldbb2@earthlink.net>], who wrote in article <3DA2FD0F.E8A96F55@earthlink.net>:
> > Now suppose two modules - which do not know about each other - try to
> > subclass select(). How would they do it?
>
> That's not how you would do it. Let's suppose you have written...
I do not discuss applications. I discuss two *modules*. Both use
POE. Both substitute their own event loop.
> , and viala! they work fine anyway.
Now I see you all are blindfolded... Let me describe some (only 1/4
contrived) example.
You have a BourneShell module. This module is given a program (a
string) of a form
(( a && ( b || c ) ) || (e && (f && h)) & (x || y) ; z ) | ( zz || zzz)
and starts the applications *without any forking*. The event loop of
this module is based on wait(). Each event is a termination of a kid;
the module then starts the new kids (with appropriate redirected
outputs) basing on the return value of the current kid.
(I assume POE is good enough to allow using an externally supplied
wait()-based event loop.) Author A writes BourneShell using POE
facilities and replaces POE event loop.
Now I find another module ShowMeTheTree; it is written by author AA;
it has a pluggable UI backend, and uses POE to get a
backend-transparent event loop.
I think: now I can use these two modules and write a debugger for
bourne shell programs which is essentially a Perl one-liner. Can I?
Ilya
------------------------------
Date: Wed, 09 Oct 2002 17:56:41 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: ithreads, perl 5.8 and shared objects
Message-Id: <x7adlnts12.fsf@mail.sysarch.com>
>>>>> "IZ" == Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:
>> that isn't what he is saying. poe can piggyback on several other
>> existing event loop systems (e.g. tk) and not use its own one. there is
>> no need to merge two complete event loop systems.
IZ> Says who? This need arises right and left. OK, so POE can use an
IZ> externally supplied event loop. But this does not scale: you cannot
IZ> simultaneously use two modules each of which wants to overwrite the
IZ> loop. There is no way to *subclass* an existing loop.
you don't subclass event loops, you hook into them. event loops provide
the api and callbacks to your code. there is no need for inheritance.
IZ> Now suppose two modules - which do not know about each other - try to
IZ> subclass select(). How would they do it?
>>
you rewrite one of them to use an external event loop. any module that
writes its one for its own uses is poorly designed and i wouldn't use it
anyway.
>> again, that is not relevant. only one module should ever do the core
>> select calls.
IZ> Nonsense. What you describe is the *current implementation* of event
IZ> loops (probably of POE only); you want to force it down the user
IZ> throats as if it were what they *want*.
no. event loops make no sense with inheritance. but you will argue the
opposite and i won't respond.
IZ> The need to subclass an existing event loop is real. This task
IZ> (designing a subclassable event loop core) is extremely hard.
IZ> However, that the problem is hard to solve does not make the problem
IZ> disappear.
show a reason for actually needing that. plenty of complex event programs have
been written without subclassing. there should be a single event loop in
any program that needs it. all other code should piggyback on it and
wrap the event api as needed. the only way inheritance would work is if
all event loops used the same method calls and apis and that will never happen.
IZ> Unix is yet more primitive in this respect - you are forced to
IZ> use pipes if you want any interleaving...
which work well. i have used pipes to sync an event loop with internal
threads with very good results. much easier than dealing with semaphores
and mutexes.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Wed, 9 Oct 2002 11:50:00 -0500
From: "Kevin Vaughn" <binabik1@mail.com>
Subject: Multiple Pings/Second
Message-Id: <uq8nidb2fn7gf2@corp.supernews.com>
I'm writing a script with the intent of pinging up to 1500 hosts within a
one minute time frame. I have decided to take up this project using Perl,
but I'm getting stuck. I am somewhat of a newbie (been programming in Perl
for a couple of months).
My problems started because I haven't found a Perl module or other
application that will let me ping as fast as I need to. The best
application that I've found is called fping, which is a CLI pinger that can
do multiple hosts at the same time. Unfortunately, if a host is down, fping
can take a while to return the results. About the fastest I could ping 1500
hosts using fping is 10 minutes.
So I started thinking - what if I could farm out a portions of the 1500
hosts, say in blocks of 50, to child processes and have those children do
the pinging. Then I would end up with 30 Perl processes that would each
take around 15-20 seconds to execute. I haven't dealt with processes yet.
Are there caveats to scripting this way? How many processes is too many?
Is there a way to launch the child processes and not have them return?
I have to call fping using the "system" command. AFAIK, the only way to
capture the results of fping is to send the output to a file via ">>". Is
there a better way? If not, what would be the best way to take groups of 50
from a hash or array and feed them to the child process?
I know this is a bunch of questions. I would appreciate your help in
answering any of them.
-Kevin
------------------------------
Date: Wed, 09 Oct 2002 17:05:49 GMT
From: shb*NO*SPAM*@comporium.net (Si Ballenger)
Subject: Re: Multiple Pings/Second
Message-Id: <3da461a7.142002158@news.comporium.net>
Do some reading on ping flooding and DNS attacks and you might
find some useful info.
On Wed, 9 Oct 2002 11:50:00 -0500, "Kevin Vaughn"
<binabik1@mail.com> wrote:
>I'm writing a script with the intent of pinging up to 1500 hosts within a
>one minute time frame. I have decided to take up this project using Perl,
>but I'm getting stuck. I am somewhat of a newbie (been programming in Perl
>for a couple of months).
>
>My problems started because I haven't found a Perl module or other
>application that will let me ping as fast as I need to. The best
>application that I've found is called fping, which is a CLI pinger that can
>do multiple hosts at the same time. Unfortunately, if a host is down, fping
>can take a while to return the results. About the fastest I could ping 1500
>hosts using fping is 10 minutes.
>
>So I started thinking - what if I could farm out a portions of the 1500
>hosts, say in blocks of 50, to child processes and have those children do
>the pinging. Then I would end up with 30 Perl processes that would each
>take around 15-20 seconds to execute. I haven't dealt with processes yet.
>Are there caveats to scripting this way? How many processes is too many?
>Is there a way to launch the child processes and not have them return?
>
>I have to call fping using the "system" command. AFAIK, the only way to
>capture the results of fping is to send the output to a file via ">>". Is
>there a better way? If not, what would be the best way to take groups of 50
>from a hash or array and feed them to the child process?
>
>I know this is a bunch of questions. I would appreciate your help in
>answering any of them.
>
>-Kevin
>
>
------------------------------
Date: Wed, 09 Oct 2002 07:46:33 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: newbie with datatype prob
Message-Id: <3DA44149.9000605@vpservices.com>
safari wrote:
> Use of uninitialized value in numeric ge (>=) at ./sending.pl line 17.
You might as well give up. Errors on line 17 are always impossible to
fix. :-)
> my $CustomerID;
> $CustomerID = param('CustomerID');
If your program can work in cases where the user (or your form) didn't
supply a CustomerID, change that to:
my $CustomerID = param('CustomerID') || '';
That way the value of $CustomerID will never be undefined.
If your program absolutely needs a CustomerID (which I'm guessing it
does), leave off the || '' part and add this after:
if( !$CustomerID ) {
print header, "You must enter a CustomerID,
please use your browser's
'back' button to resubmit
the form";
exit;
}
Or whatever other error message you'd like to send the user.
--
Jeff
------------------------------
Date: Wed, 9 Oct 2002 17:06:11 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: NEWBIE: Accessing FORM input with PERLSCRIPT
Message-Id: <Pine.LNX.4.40.0210091655550.5668-100000@lxplus076.cern.ch>
On Oct 9, Tennant inscribed on c.l.p.misc and other group(s?):
> Sorry if this is a stupid question, but having trawled through all the
> FAQs I can find I don't seem to be able to find the answer to what I
> would have thought is a simple question.
Don't multipost. I've x-posted to the other group where I found this
question had been posted separately, and set f'ups back to c.l.p.misc
> I am using Client-Side PERLSCRIPT (this is a demo which needs to run
> on a standalone laptop),
Would this be running a Win32 OS? Since you don't seem to say, I'm
assuming the answer is yes.[1]
> which has a form which collects various
> information from the user and then outputs this to a text file for
> future processing. However I cannot find out how I access the Forms
> input field from my script?
With indigoperl you could install an Apache/Perl combo which would
behave just like the familiar web technology, not needing any special
expertise to cope with your unusual requirement. I would consider
that to be a valuable bonus of leveraging a popular technology.
http://www.indigostar.com/indigoperl.htm
[snip-o-rama]
> Many thanks for any help you can give.
Avoid posting masses of code or markup. If and when you reach the
point where posting some code is appropriate, post just enough to
demonstrate the substantive issue (preferably a complete but simple
test case). This group's posting guidelines document _will_ help you
to help yourself, honestly.
good luck
[1] on the basis that anyone who had made a choice of something else
would probably have said so outright ;-)
--
Gratuitous bigotry, pedantry and sophistry has no place on the Web.
That's what Usenet is for. - Andy Dingley
------------------------------
Date: Wed, 09 Oct 2002 15:47:33 +0100
From: Tennant <tennant2NOSPAM@theforge.demon.co.uk>
To: comp.lang.perl.misc
Subject: Re: NEWBIE: Accessing FORM input with PERLSCRIPT
Message-Id: <i8g8qusd464p3bciiepmep393vhdn4tl66@4ax.com>
On Wed, 09 Oct 2002 11:18:50 +0100, Tennant
<tennant2NOSPAM@theforge.demon.co.uk> wrote:
Been experimenting with the HTML::Forms commands, but from the
helpfile cannot work out what the correct syntax should be?
Also looked at CGI, but presumably for this I need to be running IIS,
Apache or something equivalent, and really want to achieve this using
total client-side PerlScript...if it's possible?
Tennant
------------------------------
Date: Wed, 09 Oct 2002 20:02:13 +0200
From: Dan Vendel <newsgroups@vendel.info>
Subject: Newbie: Simple but GOOD form handler - WHERE?
Message-Id: <3DA46F25.6030903@vendel.info>
Hi,
I don't know anything about scripting.
But need a simple form handler to place in the cgi-bin that will point
to the perl/sendmail on a Unix server. It has to redirect to a success page.
I already have the form and the success page in HTML.
Been searching through www.hotscripts and www.scriptsearch and tried out
umpteen different free scripts. But they are all either too simple
without e.g. the success page option, too full of extra useless junk I
don't need (like writing HTML pages) or they simply don't work. (Guess I
shouldn't complain since they're free..) [;-)]
Can someone suggest a script that'll do what I described? Oh, NOT
Matt's!!! Tried that a couple of years ago and almost lost my wife in
the process. Not even Matt himself is recognising the script any
longer...I've heard.
A million TIA
Dan
--
"He who asks a question is a fool for five minutes; he who does not ask
a question remains a fool forever."
-Chinese Proverb
------------------------------
Date: Wed, 9 Oct 2002 17:28:41 +0100
From: "Rubber Duck" <rubberducky703@hotmail.com>
Subject: Question about scope.
Message-Id: <ao1le3$ih1ji$1@ID-116287.news.dfncis.de>
All,
I have a couple of sub procedures which i would like to keep as localised as
i can.
E.g
use...
# effectively main
Start();
Work();
Stop();
#end main
The problem i'm having is that Start declares some variables which are used
by either/or Work and/or Main. I'd rather not just declare these variables
as global cause i like my code nice and tidy. Is their any trick i can do
to declare a variable in start and then to be able to use the value in that
variable in another procedure - say work??
Thanks
RD
------------------------------
Date: Wed, 09 Oct 2002 10:53:50 -0400
From: add <add@nrcan.gc.ca>
Subject: Win32::OLE with IIS metabase
Message-Id: <3DA442FE.76E091A1@nrcan.gc.ca>
Hi everyone,
from CPAN documentation, I read you can use Win32::OLE to control many
Win32 applications from Perl scripts, and I read on the Microsoft site
that it's possible to see data in the IIS metabase with the same method.
Here's the code:
#######################
use Win32;
use Win32::OLE;
$vdirObj=Win32::OLE->GetObject("IIS://LocalHost/W3SVC/3/Root") or die
"can't open metabase\n";
print "Content-type: text/html\n\n";
print $vdirObj->("Path");
exit;
#######################
For an unknown reason, it's not working. There is effectively a "Path"
property in IIS://LocalHost/W3SVC/3/Root (in the metabase), but the
script dies because it can't open the metabase.
Please note I also tried IIS:\\\\LocalHost\\W3SVC\\3\\Root with the same
result...
Someone knows something about that method?
Thanks!
Christian
------------------------------
Date: 9 Oct 2002 09:22:05 -0700
From: kellan@protest.net (kellan)
Subject: Re: XML::RSS bug
Message-Id: <fddb0335.0210090822.7fb8d769@posting.google.com>
This is a long known, and very annoying feature. If you check the bug
reports against XML::RSS on CPAN you'll see a similiar report from 11
months ago.
My understanding is that the module's authors aren't interested in
fixing the problem because they want to do a clean re-write when they
get some freetime. (mythical concept that that is)
I was having a similiar problem so I threw together a hacked version
that includes some code I borrowed from Matt Sergeant to do encoding.
You can download it from:
http://protest.net/~kellan/XML-RSS-patched.tar.gz
kellan
swen <swen@news.com> wrote in message news:<3DA39E4D.C0DED3D8@news.com>...
> I notice that when I parse an rss file with XML::RSS, the parser
> converts all entity references (e.g., '&') into the enitities they
> represent (e.g. '&')within the XML::RSS object. The problem is that, if
> I then write this XML::RSS object back to disk (via 'save()') the entity
> reference is not restored. Instead the entity it represents is written
> back the file. For entities like '&', it then becomes an unparseable
> file. Is it just me or is this a bug? Or is there a way to change this
> behavior within the module.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 3940
***************************************