[15685] in Perl-Users-Digest
Perl-Users Digest, Issue: 3098 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 19 14:05:39 2000
Date: Fri, 19 May 2000 11:05:21 -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: <958759520-v9-i3098@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 19 May 2000 Volume: 9 Number: 3098
Today's topics:
Re: "Breakthrough" Perl compiler? (Gwyn Judd)
Re: "Breakthrough" Perl compiler? (Bart Lateur)
Re: "Breakthrough" Perl compiler? <jeff@vpservices.com>
Re: "Breakthrough" Perl compiler? <glauber.ribeiroNOglSPAM@experian.com.invalid>
Re: "Breakthrough" Perl compiler? <glauber.ribeiroNOglSPAM@experian.com.invalid>
Re: [ CGI ] Can you know how long someone stayed connec (brian d foy)
Re: a PS to Perl - MySQL - Notify using sendmail <jhelman@wsb.com>
Re: a script's own fullpath, when run in crontab <jhelman@wsb.com>
Re: Accurate IP return? (Bart Lateur)
Re: alphabeticalize a perl array <iltzu@sci.invalid>
Re: alphabeticalize a perl array (Randal L. Schwartz)
Re: alphabeticalize a perl array <flavell@mail.cern.ch>
Re: alphabeticalize a perl array (Bart Lateur)
Re: alphabeticalize a perl array <nospam@devnull.com>
Re: associating a filename with a FileHandle (Bart Lateur)
Re: Bug or Feature: Can't dereference array ref inside (Abigail)
COM Objects With Perl <skpurcell@hotmail.com>
Re: contract position in nyc-DB2/SQL (David H. Adler)
Re: Data Structures (complex) <nospam@devnull.com>
Re: Data Structures (complex) <nospam@devnull.com>
Re: Data Structures (complex) <jeff@vpservices.com>
Does WARN have a reset?? <tturton@ntx.waymark.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 19 May 2000 15:09:29 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <slrn8idap5.tkm.tjla@thislove.dyndns.org>
I was shocked! How could Charles Henry <charles.henry@engineer2k.com>
say such a terrible thing:
>> It's the usual hype and trying to solve a problem that doesn't
>> exist. If you want to protect your code, you should rely on a
>> contract, not on your compiler -- anything can be decompiled,
>> and languages like Perl and Java can be decompiled in a very
>> readable way.
>>
>> As for speedups, i greatly doubt it.
>>
>> Plus, you'll be using a non-standard product, which will
>> probably have bugs which are different from the ones in the
>> standard Perl compiler/interpreter. :-)
>
>Great but you seem to forget the *ONE* interesting reason to compile Perl
>script : one doesn't have to have Perl installed in order to run your
>program!
>
>It is often so much easier to just give a compiled program that you give
>your script and require your friend to install Perl on his system. True
>isn't it?
This isn't a compiler-to-machine-code anyway. From the
description it appears to be some sort of obfuscator with the
interesting property of also (apparently) speeding up your code.
--
Gwyn Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
Three minutes' thought would suffice to find this out; but thought is
irksome and three minutes is a long time.
-- A.E. Houseman
------------------------------
Date: Fri, 19 May 2000 17:07:09 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <39297351.12321435@news.skynet.be>
Tom Phoenix wrote:
>Nope. With the current state-of-the-art for compiling Perl, it's easier to
>successfully distribute Perl-and-a-script than to use a compiled binary.
>Believe it or not.
With the new Activestate Perl 5.6 REQUIRING that Internet Explorer is
installed, I pretty much doubt it.
A neat excuse for this is probably the Unicode support for Windows which
is part of the IE5 package. But it DOES smell like another attempt to
smash Netscape. Is this the result Activestate being sponsored by
Microsoft?
--
Bart.
------------------------------
Date: Fri, 19 May 2000 10:18:28 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <39257764.EF6A3921@vpservices.com>
Bart Lateur wrote:
>
> With the new Activestate Perl 5.6 REQUIRING that Internet Explorer is
> installed
Is that true???? How thoroughly disgusting.
--
Jeff
------------------------------
Date: Fri, 19 May 2000 10:57:05 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <11845572.76fa3855@usw-ex0104-026.remarq.com>
In article <39297351.12321435@news.skynet.be>,
bart.lateur@skynet.be (Bart Lateur) wrote:
[...]
>With the new Activestate Perl 5.6 REQUIRING that Internet
Explorer is
>installed, I pretty much doubt it.
[...]
This is not true. (Kinda hard to test, given that IE is already
everywhere.)
Activestate is not being sponsored by Microsoft. They made a
partnership in order to make Perl part of the NT 2000
server "Unix tools" product (whatever the official name is).
It does require the "Windows Installer", but this is something
else.
PerlScript is one of the components of Activeperl, and it does
require an "Activex scripting host", which could be I.E. or WSH.
But you can have Perl without having Perlscript.
glauber
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Fri, 19 May 2000 10:58:29 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <0d2f2c4d.775872bf@usw-ex0104-026.remarq.com>
In article <8g1on0$2e3i$1@news4.isdnet.net>, "Charles Henry"
<charles.henry@engineer2k.com> wrote:
[...]
>Great but you seem to forget the *ONE* interesting reason to
compile Perl
>script : one doesn't have to have Perl installed in order to
run your
>program!
True, but this product seems to be more of an "obfuscator" which
would still require an interpreter to run.
glauber
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Fri, 19 May 2000 11:51:35 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: [ CGI ] Can you know how long someone stayed connected?
Message-Id: <brian-1905001151360001@196.new-york-63-64rs.ny.dial-access.att.net>
In article <8g3475$esa$1@news.mch.sbs.de>, michel.dalle@usa.net (Michel Dalle) wrote:
>In article <8g1ou7$1da$1@news3.isdnet.net>, "Charles Henry" <charles.henry@engineer2k.com> wrote:
>>> rather than how long the socket stays open.
>>
>>Sorry Brian but I am not sure to understand (newbie here).
>>Could you explain me what you mean or, possibly, redirect me to a newsgroup
>>or Website where I could learn more about those so-called sockets?
>
>brian probably forgot to include the necessary :-) here.
maybe i did - but at the time i thought that would be an interesting
metric. i'm actually curious about the lifetime of network
connections and how that affects the queue of waiting connections. :)
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Fri, 19 May 2000 15:07:34 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: a PS to Perl - MySQL - Notify using sendmail
Message-Id: <392558D8.2EEE5B13@wsb.com>
You might consider using the Net::SMTP module (part of the libnet
package on CPAN). Chances are that it is probably already installed if
you have a halfway decent sysadmin. Basically, this module allows you
to interact with a mail server from within a script. An example from
the documentation:
#!/usr/local/bin/perl -w
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
To read the full docs, get to a command prompt and type:
perldoc Net::SMTP
It's fairly straightforward, but it you need some help with a piece, let
me know. Good luck,
JH
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
----------------------------------------------------------------
------------------------------
Date: Fri, 19 May 2000 15:23:46 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: a script's own fullpath, when run in crontab
Message-Id: <39255CA4.97D9E23B@wsb.com>
ahnew wrote:
>
> if i submit a351.pl as a cron job, i can't get a351.pl's fullpath. i
> have tried $0, `pwd`, cwd()
>
> please reply to victor@catchacorp.com
$0 has some very odd quirks. I guess my question is if YOU know the
path of the script (and I assume that you do since you added it to the
crontab), why not just hard-code it into the script? I realize that it
isn't nearly as elegant or portable, but it is, at least, functional.
JH
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
----------------------------------------------------------------
------------------------------
Date: Fri, 19 May 2000 16:38:00 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Accurate IP return?
Message-Id: <39256c36.10503033@news.skynet.be>
[TNN]G.Bloke wrote:
>Is there a reliable method to return a users IP address?
>
>Why? Well I'm attempting to prevent multiple votes on a vote-system, agreed
>IP and cookies won't stop the determined cheater but still.
You can't rely on it.
For example, I connect to internet through PPP. That means that almost
if I connect 10 times, I'll probably get a different IP address 8 times
out of 10. If you look up the server for my IP address (now it's
195.238.9.14), you'll find something like <dialup14.gent.skynet.be>,
where the number after "dialup" may change.
Of course, the pool of IP addresses isn't unlimited, but I could vote a
lot of times.
At the other extreme, OTHER users from the same ISP get their IP address
from the same pool, so you could mistake them for me, based on their IP
alone.
Another example of that is AOL, where all users connect to internet
through a proxy. Their IP is the IP of the proxy, what implies that
you'd only get a small number of different IP's for thousands or even
millions of people.
And than, there's the example of a family with one computer. May they
all vote? Or is it limited to one vote per computer?
--
Bart.
------------------------------
Date: 19 May 2000 15:02:47 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: alphabeticalize a perl array
Message-Id: <958747416.20884@itz.pp.sci.fi>
In article <x766sbgfmu.fsf@home.sysarch.com>, Uri Guttman wrote:
>>>>>> "TW" == The WebDragon <nospam@devnull.com> writes:
[attribution missing]
> TW> | http://www.sysarch.com/perl/sort_paper.html
>
> TW> it's too bad there's no -w and 'use strict' for html
> TW> parsers.. that page has over 1100 html errors in it. =:o
>
>care to elaborate? my coauthor also rewrote the demoronizer which fixes
>many of redmond's html blunders so he knows legal html. i would think
>his html output would not be as broken as you claim.
Unfortunately it is. Putting it through html-tidy produces the
following: (99.7% of the warnings omitted for brevity)
line 1034 column 248 - Warning: missing </font> before </p>
line 1034 column 252 - Warning: discarding unexpected </font>
line 1036 column 60 - Warning: unescaped & or unknown entity "&show"
line 1036 column 60 - Warning: <img> proprietary attribute value "absmiddle"
line 1036 column 60 - Warning: <img> lacks "alt" attribute
line 1043 column 1 - Warning: content occurs after end of body
"tmp/sort_paper.html" appears to be HTML proprietary
1977 warnings/errors were found!
The resulting HTML is still ugly - in particular it contains spurious
TT and FONT tags - but at least it is syntactically valid. I put the
tidied-up version up at http://www.sci.fi/~iltzu/sort_paper_tidy.html
temporarily, in case you wish to compare the two.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: 19 May 2000 08:22:11 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: alphabeticalize a perl array
Message-Id: <m1itwa8t0c.fsf@halfdome.holdit.com>
>>>>> "Uri" == Uri Guttman <uri@sysarch.com> writes:
>>>>> "TW" == The WebDragon <nospam@devnull.com> writes:
TW> | Also very useful is:
TW> |
TW> | http://www.sysarch.com/perl/sort_paper.html
TW> it's too bad there's no -w and 'use strict' for html
TW> parsers.. that page has over 1100 html errors in it. =:o
Uri> care to elaborate? my coauthor also rewrote the demoronizer which fixes
Uri> many of redmond's html blunders so he knows legal html. i would think
Uri> his html output would not be as broken as you claim.
Here's what iCab reports as the first 25 errors, before it gave up the report:
http://www.sysarch.com/perl/sort_paper.html
Altogether 1139 errors found. Only 25 errors are listed below.
Warning (1/1): <!DOCTYPE> is missing.
Warning (9/4): The tag <FONT> should no longer be used since HTML 4.0.
Error (10/5): The start tag for </FONT> can't be found.
Warning (10/12): The tag <FONT> should no longer be used since HTML 4.0.
Error (11/4): <I> must not contain block level tags like <P>.
Error (11/4): <FONT> must not contain block level tags like <P>.
Warning (11/130): The tag <FONT> should no longer be used since HTML 4.0.
Warning (11/176): The tag <FONT> should no longer be used since HTML 4.0.
Warning (12/113): The tag <FONT> should no longer be used since HTML 4.0.
Warning (12/157): The tag <FONT> should no longer be used since HTML 4.0.
Error (12/177): The start tag for </P> can't be found.
Error (13/15): <B> must not contain block level tags like <P>.
Warning (14/5): The tag <FONT> should no longer be used since HTML 4.0.
Error (15/11): <B> must not contain block level tags like <P>.
Warning (16/5): The tag <FONT> should no longer be used since HTML 4.0.
Error (16/21): <I> must not contain block level tags like <P>.
Error (16/21): <FONT> must not contain block level tags like <P>.
Error (16/326): The start tag for </P> can't be found.
Error (20/11): <B> must not contain block level tags like <P>.
Warning (21/5): The tag <FONT> should no longer be used since HTML 4.0.
Warning (25/4): The attribute "BORDERCOLOR" is not allowed for the tag <TABLE>.
Warning (26/5): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (27/1): The tag <FONT> should no longer be used since HTML 4.0.
Error (27/17): <I> must not contain block level tags like <P>.
Error (27/17): <FONT> must not contain block level tags like <P>.
Warning (28/1): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (29/1): The tag <FONT> should no longer be used since HTML 4.0.
Error (29/17): <I> must not contain block level tags like <P>.
Error (29/17): <FONT> must not contain block level tags like <P>.
Warning (30/1): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (31/1): The tag <FONT> should no longer be used since HTML 4.0.
Error (31/17): <I> must not contain block level tags like <P>.
Error (31/17): <FONT> must not contain block level tags like <P>.
Warning (33/5): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (34/1): The tag <FONT> should no longer be used since HTML 4.0.
Warning (35/1): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (36/1): The tag <FONT> should no longer be used since HTML 4.0.
Warning (37/1): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (38/1): The tag <FONT> should no longer be used since HTML 4.0.
Warning (40/5): In the tag <TD> the attribute "WIDTH" should only contain absolute pixel values.
Warning (41/1): The tag <FONT> should no longer be used since HTML 4.0.
Error (92/11): <B> must not contain block level tags like <P>.
Error (98/11): <B> must not contain block level tags like <P>.
Error (102/11): <B> must not contain block level tags like <P>.
Error (104/12): <TT> must not contain block level tags like <PRE>.
Error (110/12): <TT> must not contain block level tags like <PRE>.
Error (112/11): <B> must not contain block level tags like <P>.
Error (115/12): <TT> must not contain block level tags like <PRE>.
Error (118/12): <TT> must not contain block level tags like <PRE>.
Error (123/12): <TT> must not contain block level tags like <PRE>.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 19 May 2000 17:43:27 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: alphabeticalize a perl array
Message-Id: <Pine.GHP.4.21.0005191722540.4238-100000@hpplus01.cern.ch>
On 19 May 2000, Ilmari Karonen wrote:
> In article <x766sbgfmu.fsf@home.sysarch.com>, Uri Guttman wrote:
> >>>>>> "TW" == The WebDragon <nospam@devnull.com> writes:
> [attribution missing]
> > TW> | http://www.sysarch.com/perl/sort_paper.html
> >
> > TW> it's too bad there's no -w and 'use strict' for html
> > TW> parsers..
It's called a formal SGML validator, such as the online service at
http://www.htmlhelp.org/tools/validator/
Certain browsers (iCAB for one, and the new Mozilla is supposed to get
something similar) have a strict parsing option with some kind of
report. But the validator is the purpose-designed tool for strict
syntax verification.
> that page has over 1100 html errors in it. =:o
There seem to be relatively few different kinds, though. Just a lot
of them.
> >care to elaborate? my coauthor also rewrote the demoronizer which fixes
> >many of redmond's html blunders so he knows legal html.
It's a pity that there's little sign of that at the URL you cited.
Attempting to open a new block-level element while inline elements
(<B>, <FONT> etc.) seems to be a quite "elementary"(!) blunder.
> Unfortunately it is. Putting it through html-tidy produces the
> following:
I'm afraid it was this that triggered me into following up to this
posting, albeit I know it's offtopic here really. HTMLTidy is
definitely a useful tool, but I don't think it's advisable to use it
as a final arbiter of valid HTML.
> line 1034 column 248 - Warning: missing </font> before </p>
Lots of those, yes. The WDG's validator comments:
Error: end tag for FONT omitted; possible causes include a missing
end tag, improper nesting of elements, or use of an element where it
is not allowed
> line 1036 column 60 - Warning: unescaped & or unknown entity "&show"
This is the standard error that people make when coding a query string
in an HREF attribute. I see that you had no problem with correcting
it, but for anyone who might be unclear on the issue,
<owntrumpet> http://ppewww.ph.gla.ac.uk/~flavell/www/formgetbyurl.html
</>
[...other errors omitted...]
> tidied-up version up at http://www.sci.fi/~iltzu/sort_paper_tidy.html
> temporarily
<pedant>Still missing one ALT attribute, and contains two proprietary
extensions</pedant>
all the best
------------------------------
Date: Fri, 19 May 2000 17:07:06 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: alphabeticalize a perl array
Message-Id: <39287233.12035605@news.skynet.be>
Ilmari Karonen wrote:
> line 1034 column 248 - Warning: missing </font> before </p>
> line 1034 column 252 - Warning: discarding unexpected </font>
That smells like "tag soup".
HTML documents should be tree-shaped; tag soup interconnects between
branches. Example of tag soup:
plain <b> bold <i> bold and italic </b> italic only </i> plain
MS Word is one notorious program producing tag soup.
--
Bart.
------------------------------
Date: 19 May 2000 17:29:29 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: alphabeticalize a perl array
Message-Id: <8g3tlp$h9f$1@216.155.33.26>
In article <x766sbgfmu.fsf@home.sysarch.com>, Uri Guttman <uri@sysarch.com>
wrote:
| >>>>> "TW" == The WebDragon <nospam@devnull.com> writes:
|
| TW> | Also very useful is:
| TW> |
| TW> | http://www.sysarch.com/perl/sort_paper.html
|
| TW> it's too bad there's no -w and 'use strict' for html
| TW> parsers.. that page has over 1100 html errors in it. =:o
|
| care to elaborate? my coauthor also rewrote the demoronizer which fixes
| many of redmond's html blunders so he knows legal html. i would think
| his html output would not be as broken as you claim.
|
| uri
there were over 1139 errors in the file, html-wise.. iCab only lists the first
99, but enumerates the # of total errors at the top, else I'd give you the full
list.. however, check your e-mail -- in a fit of boredom, I went thru the file
whilst studying it, and fixed all the broken stuff.
TONS of mistakes like this:
<b><i><p>some header</p></i></b>
corrected to <h4><i>some header</i></h4> and similar instances.
<p><table>...</table></p> constructs do not work either as <P> can not contain
block level tags like <table> or <pre>
also TONS of usage of <dir> with no <li> contained therein.
Just because standard browsers find pitiously broken html marginally acceptable
is no reason to write it that way ;)
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 19 May 2000 17:07:03 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: associating a filename with a FileHandle
Message-Id: <39276fac.11389083@news.skynet.be>
Donald Lancon wrote:
>When you successfully open a FileHandle on a file, there is a filename
>thereby associated with the FileHandle. I just wanted to verify there's
>no way of recovering that filename later on, given only the still-open
>FileHandle.
I'm coming back to this thread, after I recently discovered that stat()
returns an "inode" number as it's second result scalar. Inode numbers
are unique for a disk, AFAIK, and stat() can work on a filehandle too.
The first result value probably identifies the device. So there IS a way
to identify a file (only, not it's name) from a filehandle.
Now, "all" you have to do is link device id and inode number back to the
file path. Easy. ;-)
--
Bart.
------------------------------
Date: 19 May 2000 17:50:35 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Bug or Feature: Can't dereference array ref inside hash
Message-Id: <slrn8iavn9.prq.abigail@ucan.foad.org>
On Thu, 18 May 2000 20:35:22 -0700, Steve Leibel <stevel@coastside.net> wrote:
++ In article <slrn8i91pq.lb4.abigail@ucan.foad.org>, abigail@arena-i.com wrote:
++
++ > On Wed, 17 May 2000 23:03:51 -0700, Steve Leibel <stevel@coastside.net> wro
++ > ++ If I have a hash reference, one of whose keys is an array ref, like this
++ > ++
++ > ++ $myhash = {
++ > ++ arrayref => (),
++ > ++ };
++ >
++ > Had you used -w, you wouldn't have to ask, as Perl would have told you
++ > the above as an error.
++ >
++ > () is an empty list. [] creates an array reference.
++ >
++
++ When I ran this program with -w and 'use strict' it gave the error
++
++ "Odd number of elements in hash assignment"
Indeed. Didn't that ring a bell? Did you look up what it means in
man perldiag?
Abigail
------------------------------
Date: Fri, 19 May 2000 10:32:04 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: COM Objects With Perl
Message-Id: <39255e70$0$28521@wodc7nh1.news.uu.net>
Hello,
I am a Perl guy, and just found out what COM stood for yesterday. Anyway, I
have a customer who wants me to use their ASPMail, which I foiund out is a
COM object.
Can I use Perl to talk to that Object and send mail from it? I was told I
can use Win32::OLE but I am not having any success. I copied from the help
menu the first line of creating an object with Win32::OLE.
# eg. $ex = Win32::OLE->new('Excel.Application') or die "oops\n"; # yes
that works.
So I tried
$ex = Win32::OLE->new('SMTPsvg.Mailer') or die "oops\n"; # I found that
name in the documenttion for AspMail
Anyway, they have code that is in ASP, I will show you below, and it works,
so I know it is installed properly. But I need to use straight Perl, or some
module from Perl to talk to it. Could someone please help me get started
with this. I am having a real bad go at this.
Thanks
Scott
####ASP code that works today #######
after doing a quick get from a simple HTML page
<html>
<head><title>ASP Mailer Form Test</title><head>
<body bgcolor="white">
<H3 align="center">ASP Mailer Form Test</H3>
Mail To: <% = Request.QueryString("addressto") %><br>
<p>
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
rem change this RemoteHost to a valid SMTP address before testing
Mailer.RemoteHost = "xxx.xxx.xxx.xxx"
Mailer.FromName = "Scott K Purcell"
Mailer.FromAddress = "anyone@unknownhost.net"
Mailer.AddRecipient Request.QueryString("nameto"),
Request.QueryString("addressto")
Mailer.Subject = "Asp Mail Server Is Working"
Mailer.BodyText = Request.QueryString("txtmsg")
if not Mailer.SendMail then
Response.Write " Mailing Failed... Error is: <br>"
Response.Write Mailer.Response
else
Response.Write " sent successfully...<p>"
end if
Response.Write "This component expires: " & Mailer.Expires & "<p>"
%>
</body>
</html>
------------------------------
Date: 19 May 2000 18:04:32 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: contract position in nyc-DB2/SQL
Message-Id: <slrn8ib0hg.kiq.dha@panix2.panix.com>
On Fri, 12 May 2000 20:49:13 GMT, johnkail@way.com <johnkail@way.com>
wrote:
>hi, i'm a headhunter seeking an experienced DB2 SQL programmer for
>our client, a major international bank in new york city. "DB2
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
SURF MUSIC makes EVERYTHING better! - Tom Servo
------------------------------
Date: 19 May 2000 17:25:25 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Data Structures (complex)
Message-Id: <8g3te5$h9f$0@216.155.33.26>
In article <slrn8ia7d8.7pd.tadmc@magna.metronet.com>, tadmc@metronet.com (Tad
McClellan) wrote:
| >if I read in the database.txt file like this:
| >
| >open(IN, "<database.txt");
|
|
| Except your real code will check the return value from open(), right?
|
| :-)
heehee good point.. My next questions is, how do I handle things, if the
database file has been *cleared* at the start of a new week?
| > chomp(@database = <IN>);
| >close IN;
| >
| >foreach (@database) {
| > my($type, $reviewer, $map) = split /\|/;
| > $masterlist{$type}{$reviewer} = $map;
| >}
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 19 May 2000 17:33:22 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Data Structures (complex)
Message-Id: <8g3tt2$h9f$2@216.155.33.26>
In article <39253C49.BFB6AB6E@vpservices.com>, Jeff Zucker
<jeff@vpservices.com> wrote:
| The WebDragon wrote:
| >
| > In article <3924C8F1.977527E6@vpservices.com>, Jeff Zucker
| > <jeff@vpservices.com> wrote:
| >
| > | that is the route you want to go. But since you have a database, why
| > | not treat it like a database and use DBD::CSV or DBD::RAM? With those
| >
| > Hmm.. not part of the current MacPerl build .. Assuming these are on
| > CPAN, I
| > wonder if they have been tested for compatibility on Macs? I'll have to
| > peek
| > around <http://testers.cpan.org/> to be sure.
|
| It looks like DBD::CSV has passed on MACOS_68k and therefore DBD::RAM
| should do fine also since the only non-pure-Perl part of DBD::RAM is the
| SQL::Statement module that is also used by DBD::CSV.
so do I first download DBI and install it and then DBD::CSV, and DBD::RAM ? I'm
guessing I need SQL::Statement as well ?
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 19 May 2000 10:36:42 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Data Structures (complex)
Message-Id: <39257BAA.2D8544DB@vpservices.com>
The WebDragon wrote:
>
> so do I first download DBI and install it and then DBD::CSV, and DBD::RAM ?
Yes, in that order.
> I'm guessing I need SQL::Statement as well ?
Yes and if you want to run DBD::CSV, also Text::CSV_XS.
If you can wait till Monday there will be a much improved and expanded
version of DBD::RAM available.
--
Jeff
------------------------------
Date: Fri, 19 May 2000 11:33:36 -0500
From: Tom Turton <tturton@ntx.waymark.net>
Subject: Does WARN have a reset??
Message-Id: <39256CE0.D2822396@ntx.waymark.net>
I've used 'die' and 'warn' in the past with no problems, but now I'm
seeing something I don't understand, and can't find anything on in the
O'Reilley Perl books.
In a subroutine, I have an if block, and in one branch, I use warn to
print a warning (warn "WARNING:: Outside of allowable limits.\n";)
The first time through this branch, I get the warning, but subsequent
passes fail to display the warning. Yet I follow the 'warn' with a
debug print statment, and I see that each time, so I know I'm exercising
the branch of the if block.
Does 'warn' have a flag I need to clear or reset?
Thanks.
------------------------------
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 3098
**************************************