[13451] in Perl-Users-Digest
Perl-Users Digest, Issue: 861 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 21 00:07:25 1999
Date: Mon, 20 Sep 1999 21:05:08 -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: <937886707-v9-i861@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 20 Sep 1999 Volume: 9 Number: 861
Today's topics:
Re: answers (Kragen Sitaker)
Re: answers <ltl@rgsun40.viasystems.com>
Re: answers <uri@sysarch.com>
Re: deja.com alters posts (John Stanley)
Re: File Upload <emschwar@rmi.net>
Re: How to chown and chmod KernelKlink@webtv.net
How to get the underlying thingy <stacy.doss@amd.com>
Re: How to get the underlying thingy (Kragen Sitaker)
LWP::UserAgent and timeout problem (Steve Linberg)
Re: Math with Perl? (Turgut Durduran)
mongers and beer, was Re: answers <ltl@rgsun40.viasystems.com>
Re: mongers and beer, was Re: answers <uri@sysarch.com>
Re: Newbie Help: Syntax of Perl Command (Steve Morris)
now totaly off topic, ignore <ltl@rgsun40.viasystems.com>
Re: now totaly off topic, ignore <uri@sysarch.com>
Re: ODBC: Creating a System DSN with perl (AcCeSsDeNiEd)
Re: PB opening access .mdb <duraipPLEEASE__REMOVE_THIIS@extendsys.com>
Re: Perl : Excel OLE Automation <duraipPLEEASE__REMOVE_THIIS@extendsys.com>
Re: Porting Perl script to Win32 perl <bwalton@rochester.rr.com>
Re: Some e-mails get sent, some don't (Bill Moseley)
Web Mail <jasonp@yta.attmil.ne.jp>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 21 Sep 1999 01:05:44 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: answers
Message-Id: <IRAF3.23328$N77.1850992@typ11.nn.bcandid.com>
In article <AHAF3.23310$N77.1849179@typ11.nn.bcandid.com>,
Kragen Sitaker <kragen@dnaco.net> wrote:
>In article <37e6d543@derwent.nt.tas.gov.au>,
>Andrew <casino@start.com.au> wrote:
>>love the way people say...
>>'not a perl question'
>>or
>>'read some doco'
>>
>>is this because you are so arrogant or just don't know?
>
>I usually say "not a perl question" because I'm arrogant *and* just
>don't know.
In case you really don't know: the real reason is that I think people
shouldn't post off-topic questions, and by chastising them, I hope I
will make them figure out the right place to post the questions. This
will make life easier for everyone.
>I usually say "read some doco" because I think reading
>some doco will be far more helpful than even a hundred helpful
>newsgroup answers -- although some things are hard to find before
>reading *all* the docs, so I try to provide helpful newsgroup answers.
I should also mention that I don't ever say "read some doco" when I
don't know the answer, because the answer might not be *in* the docs.
Then I would have done a Bad Thing.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 21 Sep 1999 01:12:30 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: answers
Message-Id: <7s6m1u$8o6$1@rguxd.viasystems.com>
Andrew <casino@start.com.au> wrote:
:>love the way people say...
:>'not a perl question'
:>or
:>'read some doco'
:>is this because you are so arrogant or just don't know?
I see this attitude from new posters surprisingly often. I was
wondering: if this is representative of normal human behavior, why
don't people walk into a party and say "you guys are all a bunch of
loudmouth assholes!", then wander over to the keg and poor themselves
a beer.
I think it must be because we don't have any beer here. usenet
groups should serve beer if they expect new posters to be friendly
and respectful.
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: 20 Sep 1999 22:10:00 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: answers
Message-Id: <x7r9jt6mmf.fsf@home.sysarch.com>
>>>>> "ll" == lt lindley <ltl@rgsun40.viasystems.com> writes:
ll> I think it must be because we don't have any beer here. usenet
ll> groups should serve beer if they expect new posters to be friendly
ll> and respectful.
that's why we have beer at perl monger gatherings. :-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 21 Sep 1999 01:19:16 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: deja.com alters posts
Message-Id: <7s6mek$nop$1@news.NERO.NET>
In article <oxzF3.1194$1s6.10044@news1.online.no>,
Trond Michelsen <mike@crusaders.no> wrote:
>mike cardeiro <mikecard@my-deja.com> wrote in message
>> When i clicked on the link i got a deja.com internal server error so i
>> looked at the actual url within the link and saw this:
>> http://www.deja.com/[ST_rn=md]/[ST_artlink=www.stonehenge.com]/jump/http
>> ://www.stonehen ge.com/merlyn/
>
>> I am sure this is not how the original poster coded the anchor adress.
>
>I don't agree. Usenet is for text/plain, while webpages are for text/html.
That does not mean it is ethical to change the contents of a USENET
message when you archive it.
>If you want to display a plaintext-message in a html-document, you have to
>do /some/ conversion to get the look&feel from a regular newsreader. This
>could be as simple as slapping <pre></pre> around the message and converting
>< to < ,
That is as far as it needs to go.
>but you probably want to take it further and add links to
>email-addresses and URIs
Sorry, but you just said that the USENET message is text/plain.
Text/plain has no markers for email addresses or URI, so you cannot
pretend that it contains them. Adding them by guessing that something
is an email address is <just@plain.wrong>. Can you figure out why?
> and maybe you want to put a <BR> at the end of each
>line.
<PRE> needs no such nonsense. And <BR> is an invalid email address.
>Maybe you even want to replace "\n\n-- \n" with "\n\n<HR>\n" or print
You are once again assuming some structure to a text that you claim has
none. "\n\n<HR>\n" is nothing like the sigdash -- it does not contain
two hyphens and a space, for one thing.
>However, the r/really/ important part is that the message when viewed
>normally in the browser is identical to the message when viewed in a
>newsreader.
And making plain text into links means it does not appear the same.
But the problem that is being reported is not just changing how the
message looks. DejaNews monitors click-throughs by changing URL's.
That's why they all point to a deja.com address.
------------------------------
Date: 20 Sep 1999 19:41:11 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: File Upload
Message-Id: <xkfyae1kpmw.fsf@valdemar.col.hp.com>
Burt Hwang <bhwang@prodigy.net> writes:
> Objective: I need to pass a file from a webpage along with some other
> data (i.e, email address, name, etc.) and store the uploaded file on the
> web server.
A laudable goal, to be sure.
> Problem: I've checked out cgi-lib.pl and used a sample code to display
> (on the user's browser) the uploaded file but I can't figure out how to
> actually store the uploaded file on the server.
Okay, let's see what we have here:
> require "../cgi-lib.pl";
That's your first mistake. Use CGI.pm instead ("perldoc CGI" for more
info). It's standard, it comes with Perl, and it has pages upon pages
upon pages upon-- you get the idea-- of documentation. Including a
section entitled, "CREATING A FILE UPLOAD FIELD".
> # When writing files, several options can be set... here we just set one
> # Limit upload size to avoid using too much memory
> $cgi_lib'maxdata = 524288;
That's silly. Perl will use as much (or as little) as it takes.
> # Start off by reading and parsing the data. Save the return value.
> # We could also save the file's name and content type, but we don't
> # do that in this example.
> $ret = &ReadParse;
With CGI.pm, you don't need to do this.
> # A bit of error checking never hurt anyone
CGI.pm handles this for you-- it won't die, but you can check for errors
much more easily.
> # Munge the uploaded text so that it doesn't contain HTML elements
>
> # This munging isn't complete -- lots of illegal characters are left
> as-is.
With CGI.pm, it's all taken care of for you, and it's all done correctly,
instead of the ad-hoc way you chose-- which, as you noted, is neither
complete nor correct.
> # However, it takes care of the most common culprits.
Maybe. But why not do it right, especially when that means no more extra
work for you?
> # Now produce the result: an HTML page...
>
> print &PrintHeader;
>
> print &HtmlTop("File Upload Results");
print header, start_html( -title => "File Upload Results" );
$notes = param('note');
$filename = param('upfile');
{ local $/; $file_contents = <$filename>; } # this reads the file's
# contents into $file_contents
# (clever, eh?)
> print <<EOT;
>
>
> <p>You've uploaded a file. Your notes on the file were:<br>
>
> <blockquote>$in{'note'}</blockquote><br>
<blockquote>$notes</blockquote><br>
Although you may want to use <pre> here.
> <p>The file's contents are:
>
> $in{'upfile'}
This doesn't take into account that the file may (in fact, probably does)
contain HTML entities in it. You can use HTML::Entities to encode it for
display in HTML. Just put "use HTML::Entities;" at the top of your
program, and then call "print encode( $file_contents );" wherever you
want it. "perldoc HTML::Entities" for more. HTML::Entities is also
standard with Perl.
> EOT
> print &HtmlBot;
print end_html;
See how easy it is when you use the standard modules to do things?
People smile at you more, dogs and children like you, a funny little
spring creeps its way into you step, and the sun shines just a little
brighter.
Oh, and it's also correct, tested, and thoroughly documented. But
whatever reason gives you more bang for the buck, unless you really
really really know what you're doing, using CGI.pm is way faster, both in
terms of your time, and in terms of the time you spend fixing bugs that
creep in because you didn't know what you were doing exactly.
-=Eric
------------------------------
Date: Mon, 20 Sep 1999 20:52:42 -0400 (EDT)
From: KernelKlink@webtv.net
Subject: Re: How to chown and chmod
Message-Id: <4973-37E6D6DA-12@newsd-213.iap.bryant.webtv.net>
Jonathan Stowe wrote:
>>>>>>>>>>
You obviously didnt look very hard as there is a Perl builtin chmod -
however an alternative might by to use umask instead so the file is
created with the correct permissions in the first place.
perldoc -f chmod
perldoc -f umask
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>>>>>>>>>>>
I DID look hard, very hard. But obviously not in the right places.
Despite the slam, thank you for your response. I will checkout perldoc
-f chmod & umask.
------------------------------
Date: Mon, 20 Sep 1999 20:15:04 -0500
From: Stacy Doss <stacy.doss@amd.com>
Subject: How to get the underlying thingy
Message-Id: <37E6DC18.1337AB05@amd.com>
How can I get the underlying thingy in a ref
for example
my $r = ref($ref);
if ($r) {
if ($r =~ /(HASH|ARRAY|CODE|REF|GLOB|SCALAR)/)) {
print "reference is built-in $r\n";
} else {
print "reference is a $r bless'd thingy\n";
print "underlying built-in is a $X\n"
}
} else {
print "not a reference\n";
}
So how do I find X???
I can do something like
$X = "$r";
$X =~ s/^$r\=(.+)\(.*$/$1/;
but this doesn't 'feel' right
any suggestions????
Stacy
--
_______ : Stacy Doss
\____ | Advanced : Product Development Engineering
/| | | Micro : Stacy.Doss@amd.com
| |___| | Devices : Voice: (512) 602-2324
|____/ \| : FAX: (512) 602-6970
: Wats Line: 1-800-538-8450 x52324
------------------------------
Date: Tue, 21 Sep 1999 01:20:41 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: How to get the underlying thingy
Message-Id: <J3BF3.23351$N77.1853719@typ11.nn.bcandid.com>
In article <37E6DC18.1337AB05@amd.com>, Stacy Doss <stacy.doss@amd.com> wrote:
> if ($r =~ /(HASH|ARRAY|CODE|REF|GLOB|SCALAR)/)) {
> print "reference is built-in $r\n";
FWIW, this breaks the first time someone defines a class called HASHmaker.
> } else {
> print "reference is a $r bless'd thingy\n";
> print "underlying built-in is a $X\n"
>
>So how do I find X???
perldoc -f ref
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 22:25:42 -0400
From: slinberg@crocker.com (Steve Linberg)
Subject: LWP::UserAgent and timeout problem
Message-Id: <slinberg-2009992225430001@bsg-ma2b-239.ix.netcom.com>
I'm having trouble getting the timeout method for LWP::UserAgent to act
like it seems to me that it should. RH Linux 5.2, kernel 2.0.36, Perl
5.005_02.
I want to test a list of words to see if a URL containing each responds to
HEAD or GET requests - essentially, a crude (and imperfect, but good
enough for my purposes) test to see if a domain has a web server live and
attached. I initially tried this using LWP::Simple, but ran into huge
hangups, so I switched to LWP::UserAgent so I could safely time out. The
trouble is, it's not timing out; some of the requests take a hugely long
time regardless of how I set timeout.
My question is: why? I've pored over all the man pages, the Camel and
Ram, dejanews, and even the source (*gasp*) without any little light bulbs
coming on. Any comments, suggestions, and whacks upside the head
appreciated. Here's the code, which, again, generally works, but does
come up with horrific waits that far exceed the 15-second timeout I'm
using:
#!/usr/bin/perl -w
#
use strict;
use LWP::UserAgent;
my @words = qw(foo bar baz kajdfkhj);
my $ua = LWP::UserAgent->new;
for (@words) {
my $url = qq(http://www.$_.com);
print "testing $url...\n";
$ua->timeout(15); #reset from paranoia
my $head_resp = $ua->simple_request(HTTP::Request->new('HEAD', $url));
next if ($head_resp->is_success);
$ua->timeout(15); #reset from paranoia
my $get_resp = $ua->simple_request(HTTP::Request->new('GET', $url));
next if ($get_resp->is_success);
print "$url failed (GET status line: " . $get_resp->status_line . ")\n";
}
------------------------------
Date: 21 Sep 1999 03:15:51 GMT
From: durduran@mail1.sas.upenn.edu (Turgut Durduran)
Subject: Re: Math with Perl?
Message-Id: <7s6t97$f61$1@netnews.upenn.edu>
David Cassell (cassell@mail.cor.epa.gov) wrote:
: [courtesy cc to poster's Reply-To address]
sorry. I was faking my reply-to so thatI do not get spam :)
thanks a lot .
: Numerical recipes? Yes. Not only is there the new 'wolf'
: book from O'Reilly, but there are lots of helpful Perl modules
did not know that! really cool.
Thanks for the pointers and advice.
: In my experience, it is often faster to do the coding in Perl
: and let the computer run a tad longer while I am elsewhere,
: than to code in another language and waste more of *my* time.
: But that changes as the size of the computational task gets
: ever larger...
I was hoping for this too.
thanks again for the advice.
turgut
durduran@mail.
sas.upenn.edu
------------------------------
Date: 21 Sep 1999 02:32:45 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: mongers and beer, was Re: answers
Message-Id: <7s6qod$9vu$1@rguxd.viasystems.com>
Uri Guttman <uri@sysarch.com> wrote:
:>>>>>> "ll" == lt lindley <ltl@rgsun40.viasystems.com> writes:
:> ll> I think it must be because we don't have any beer here. usenet
:> ll> groups should serve beer if they expect new posters to be friendly
:> ll> and respectful.
:>that's why we have beer at perl monger gatherings. :-)
I contacted the head of the local mongers to see what was what. He
said that they had never met in person, just helped each other with
Perl questions and such, and were considering setting up some weekly
virtual meetings like an IRC channel or something. What's up with
that? I can get that much with usenet. Where they live makes no
difference at all?
OTOH, what does Perl have to do with the people I drink beer with?
To this date nothing at all. The guys I hang with don't know shit
about Perl. They want to go fishing in the Chesapeake Bay for
huge rockfish this fall. Thats got nothing to do with Perl.
Hmmm. I guess I have a life after all.
P.S.
If you are going to give me custom quote chars (thankyou), use 'ltl'
or 'lt' instead of 'll'. 'll' was the moniker of my boss in the
early '80s and since he is dead now, seeing 'll' gives me the
creeps.
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: 20 Sep 1999 22:54:45 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: mongers and beer, was Re: answers
Message-Id: <x7ogex6kju.fsf@home.sysarch.com>
>>>>> "ll" == lt lindley <ltl@rgsun40.viasystems.com> writes:
ll> I contacted the head of the local mongers to see what was what. He
ll> said that they had never met in person, just helped each other with
ll> Perl questions and such, and were considering setting up some weekly
ll> virtual meetings like an IRC channel or something. What's up with
ll> that? I can get that much with usenet. Where they live makes no
ll> difference at all?
boston pm has both separate social and tech meetings about once a
month. your local pm has to get its act together. like you say, it has
to offer more than online stuff.
ll> OTOH, what does Perl have to do with the people I drink beer with?
ll> To this date nothing at all. The guys I hang with don't know shit
ll> about Perl. They want to go fishing in the Chesapeake Bay for
ll> huge rockfish this fall. Thats got nothing to do with Perl.
ll> Hmmm. I guess I have a life after all.
it's fun to talk geek and perl with a beer in hand and 2 in stomach.
ll> P.S.
ll> If you are going to give me custom quote chars (thankyou), use 'ltl'
ll> or 'lt' instead of 'll'. 'll' was the moniker of my boss in the
ll> early '80s and since he is dead now, seeing 'll' gives me the
ll> creeps.
sorry, supercite picks them and i am too lazy to cutomize them on the
fly. i just select the initial mode in my .emacs
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 21 Sep 1999 02:43:51 GMT
From: morris@rahul.net (Steve Morris)
Subject: Re: Newbie Help: Syntax of Perl Command
Message-Id: <7s6rd7$ofi$1@samba.rahul.net>
In article <cSWD3.37245$kL1.417741@news2.rdc1.on.home.com>,
"B.J.G." <Ghassemlou@home.com> writes:
> Q1- I need to find out to exit a "ForEach" loop!
> is there such a thing like:
> ForEach $elem (@Array) [Until ...] {...}
You can't exit out of a forEach loop because there isn't one.
A foreach on the other hand can be terminated with last.
foreach $elem ( qw/ 1 2 3 4 5/){
print;
last if $_ == 3;
}
> Q2- Where can I get a document which list the syntax of all Perl Command.?
It should be under your fingertips. perldoc perlsyn or try perldoc perl for
the big picture.
> Thank everyone
> bGhassemlou@yahoo.com
>
You're welcome. Hope this helps.
Steve
------------------------------
Date: 21 Sep 1999 03:15:59 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: now totaly off topic, ignore
Message-Id: <7s6t9f$ahp$1@rguxd.viasystems.com>
Uri Guttman <uri@sysarch.com> wrote:
[snip all lower case text]
:>--
:>Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
:>uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
:>Have Perl, Will Travel ----------------------------- http://www.sysarch.com
:>The Best Search Engine on the Net ------------- http://www.northernlight.com
:>"F**king Windows 98", said the general in South Park before shooting Bill.
Uri, I'm being rude and I know it, but I'm not intending to be mean
with the following: I understand why you eschew uppercase chars when
you write (well, I slightly disaprove, but I understand), but why not
extend that to your handle and your sig?
and as you are a South Park fan, I provided you with the perfect setup
this weekend when I "declared shenanigans on a certain Kenny". I thought
for sure that you would *plonk* him and cry something to the effect of
"those bastards, they killed kenny!" Was the reference to 'gr' so
blinding that you missed the perfect setup? I get some pleasure out
of playing the straight man and was a bit miffed that nobody bit
on that one.
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: 20 Sep 1999 23:52:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: now totaly off topic, ignore
Message-Id: <x7lna07wgr.fsf@home.sysarch.com>
>>>>> "ll" == lt lindley <ltl@rgsun40.viasystems.com> writes:
ll> Uri, I'm being rude and I know it, but I'm not intending to be mean
ll> with the following: I understand why you eschew uppercase chars when
ll> you write (well, I slightly disaprove, but I understand), but why not
ll> extend that to your handle and your sig?
because i don't type them on the fly each time!
ll> and as you are a South Park fan, I provided you with the perfect setup
ll> this weekend when I "declared shenanigans on a certain Kenny". I thought
ll> for sure that you would *plonk* him and cry something to the effect of
ll> "those bastards, they killed kenny!" Was the reference to 'gr' so
ll> blinding that you missed the perfect setup? I get some pleasure out
ll> of playing the straight man and was a bit miffed that nobody bit
ll> on that one.
because i don't want to swing at every pitch!
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Tue, 21 Sep 1999 02:45:23 GMT
From: dillon_rm@magix.com.sg (AcCeSsDeNiEd)
Subject: Re: ODBC: Creating a System DSN with perl
Message-Id: <37e6f141.115268@news.magix.com.sg>
Hi Felix, thanks for the help!
ODBC_ADD_SYS_DSN wasn't programmed in the ODBC perl module.
But adding the numeric 4 in place of ODBC_ADD_SYS_DSN did the trick!
On Sun, 19 Sep 1999 09:48:37 GMT, felixg@skynet.be (Felix Geerinckx)
wrote:
>On Sun, 19 Sep 1999 08:36:51 GMT, dillon_rm@magix.com.sg
>(AcCeSsDeNiEd) wrote:
>
>>How in the world do I create a System DSN with the ODBC.pm?
>>
>>I only know how to create a user dsn. The code goes something like
>>this:
>>
>>Win32::ODBC::ConfigDSN(ODBC_ADD_DSN,
>> $DriverType,
>> ("DSN=$DSN",
>> $Description,
>> "DBQ=$dir\\$DataBase",
>> "DEFAULTDIR=$dir",
>> "UID=user", "PWD=password"))
>>
>
>Did you try ODBC_ADD_SYS_DSN instead of ODBC_ADD_DSN?
>(Note ODBC_ADD_SYS_DSN = 0x04).
>
>-Felix
>
To e-mail me, remove "_rm"
------------------------------
Date: 21 Sep 1999 01:36:17 GMT
From: "pjd" <duraipPLEEASE__REMOVE_THIIS@extendsys.com>
Subject: Re: PB opening access .mdb
Message-Id: <7s6neh$gcb$0@198.102.102.248>
>Perhaps if all you are doing is reading recordsets and inserting rows you
>might want to try Win32::ODBC. The homepage for this is
I have accessed access tables with DBI with ODBC DBD.
Works rather nicely.
pj
------------------------------
Date: 21 Sep 1999 01:31:31 GMT
From: "pjd" <duraipPLEEASE__REMOVE_THIIS@extendsys.com>
Subject: Re: Perl : Excel OLE Automation
Message-Id: <7s6n5j$fk7$0@198.102.102.248>
Matt King wrote in message <7s5pj3$opa$1@news.uk.ibm.com>...
>I have been taking a look at the information located here
>http://www.mkaz.com/web/perl/xl_oleauto.html . It looks and sounds like a
That was rather old.
Here is a currently working version of the same script.
Make sure the $xlfile exists and has some values in the cells.
## Start
use Win32::OLE;
$xlfile ="c:\\tmp\\book1.xls";
# Create OLE object - Excel Application Pointer
$xl_app = Win32::OLE->new('Excel.Application') or die $!;
# Set Application Visibility
# 0 = Not Visible
# 1 = Visible
$xl_app->{'Visible'} = 0;
# Open Excel File
$workbook = $xl_app->Workbooks->Open($xlfile);
# setup active worksheet
$worksheet = $workbook->Worksheets(1);
# retrieve value from worksheet
$cellA1 = $worksheet->Range("A1")->{'Value'};
$cellB1 = $worksheet->Range("B1")->{'Value'};
print $cellA1 , "\n";
print $cellB1 , "\n";
# Close It Up
$xl_app->ActiveWorkbook->Close(0);
$xl_app->Quit();
## End
Hope that helps
pj
------------------------------
Date: Mon, 20 Sep 1999 21:17:46 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Porting Perl script to Win32 perl
Message-Id: <37E6DCBA.3391C345@rochester.rr.com>
Cheryl Brannan wrote:
>
> I've got a script to parse text from another page. The demo (at:
> http://webreview.com/wr/pub/98/10/30/perl/index.html is a regular Perl
> script that I am trying to utilize in a ASP page.
>
> Here's what I've got after removing unusable bits:
>
> <%@language=perlscript%>
> <%
> use CGI;
> use CGI::Carp (fatalsToBrowser);
> use LWP::Simple;
>
> $URL = "http://www.foo.com/index.html";
>
> unless (defined ($page = get($URL))) {
> die "There was an error getting URL: $URL\n";
> }
>
> @page = split(/\n/,$page);
>
> $start=0;
> foreach $line (@page){
> print "$line\n" if($start == 1);
> if($line =~ /ul compact/){
Cheryl, if you really mean it when you say (below) that you are
looking for "UL COMPACT", then you need to either put in
"UL COMPACT" above (not "ul compact"), or add the "i" switch to
the pattern match so it won't care about case. And, I assume,
you want to exclude the "UL COMPACT" line from the output, but
include the "/UL" line, per your logic?
> $start = 1;
> }
> last if($line =~ /\/UL/);
> }
>
> %>
>
> Basically the script is supposed to start parsing when it sees
> "UL COMPACT" and stop after "/UL". Right now all I'm getting is a blank
> page with the HTML / BODY tag stucture with nothing in between.
>
> Thanks for any and all assistance.
> --Cheryl
--
Bob Walton
------------------------------
Date: Mon, 20 Sep 1999 18:52:30 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Some e-mails get sent, some don't
Message-Id: <MPG.125084b739b3831898975f@nntp1.ba.best.com>
Tom Phoenix (rootbeer@redcat.com) seems to say...
> On Mon, 20 Sep 1999, Bill Moseley wrote:
>
> > Ok. What about the previous question:
> > >> $addr =~ s/'/\\'/g;
> > >> if(!open(M,"|mail '$addr'"){
> >
> > Can anyone think of holes in that simple approach?
>
> Is this what you want? Cheers!
>
> $addr = q(billg@microsoft.com\';echo gotcha);
Should have seen that coming.
What I've done quick and dirty (not for email address, but for other
user data where I know I shouldn't see any single quotes):
$adr =~ s/'/ /g;
Now, what am I missing (besides a safe pipe open)?
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Tue, 21 Sep 1999 11:45:18 +0900
From: "Jason Petrillo" <jasonp@yta.attmil.ne.jp>
Subject: Web Mail
Message-Id: <7s6rhq$94k$1@news.yokota.attmil.ne.jp>
Anyone out there have a suggestion for setting up Web Mail with Perl. This
would be from an existing customer base.
--
Thank you,
Webmaster
Military Support
------------------------------
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 861
*************************************