[13314] in Perl-Users-Digest
Perl-Users Digest, Issue: 724 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 6 19:23:22 1999
Date: Mon, 6 Sep 1999 16: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)
Perl-Users Digest Mon, 6 Sep 1999 Volume: 9 Number: 724
Today's topics:
advise please with input buffering and flock problem <peter@tienderen.demon.nl>
Can Perl Do It?. . . . <mrprenzl@midusa.net>
editing images with perl <Floyd@NewWebSite.com>
Emacs Freezes Editing Perl Scripts <robert.l.flaugherREMOVE@trw.com>
Re: Emacs Freezes Editing Perl Scripts (Coy A Hile)
Re: Emacs Freezes Editing Perl Scripts (Ilya Zakharevich)
Re: Hopefully on-topic CGI question: simple db routine <Floyd@NewWebSite.com>
Re: how to make sort() case insensitive? (Abigail)
Re: how to make sort() case insensitive? (Abigail)
Re: how to make sort() case insensitive? (Bill Moseley)
HTML::Parse and HTML::FormatText?? <ubu@easynet.ca>
Re: HTML::Parse and HTML::FormatText?? (Bill Moseley)
Re: mysql interview (Abigail)
Re: mysql interview <borg@imaginary.com>
Re: mysql interview <borg@imaginary.com>
Re: mysql interview <borg@imaginary.com>
Newbie - Which version Should I Use <michaeld@netcom.ca>
Re: Newbie - Which version Should I Use <Floyd@NewWebSite.com>
Re: non oop style <gellyfish@gellyfish.com>
Re: PITFALLS: Access97 to SQL Server 7.0 info webmuse@my-deja.com
Re: PITFALLS: Access97 to SQL Server 7.0 info webmuse@my-deja.com
Playing .au or .wav file? xdiv@hotmail.com
R: Help Please: reading email <nando@tetecma.com>
Re: shebang question for Win32 Perl/Apache <gellyfish@gellyfish.com>
Re: Size <gellyfish@gellyfish.com>
Re: Win95 Perl interpretor <Floyd@NewWebSite.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 6 Sep 1999 23:00:13 +0200
From: "Peter van Tienderen" <peter@tienderen.demon.nl>
Subject: advise please with input buffering and flock problem
Message-Id: <936651329.14643.0.pluto.d4ee06f0@news.demon.nl>
Hi,
in a script I use somthing like this
open(DUB, "+<$dubfile") || die "Content-type: text/plain\n\n Could not open
$dubfile\n";
flock(DUB,2) || die "Content-type: text/plain\n\n Could not lock
$dubfile\n";
$line = <DUB>;
# do something with $line here producing $newmessage....
print DUB $newmessage;
close DUB;
It seems that when two instances of the script run at the same time, one
waits nicely at the flock but after that still reads the _old_ contents of
the DUB file rather the new contents that was just written to it by the
other instance. Am I right that this can happen, for instance because the
open automatically loads some contents of the file in an inputbuffer? If so,
what is a solution?
Thanks,
Peter van Tienderen
------------------------------
Date: Mon, 06 Sep 1999 16:42:26 -0500
From: Larry Bottorff <mrprenzl@midusa.net>
Subject: Can Perl Do It?. . . .
Message-Id: <37D43542.935F0E82@midusa.net>
Hello,
I need advice. I work for a large tax software firm that wants to "get
on the Web/Internet". Presently, we're solid SatanWare (Microsoft), but
I don't trust the MS way of doing Web. Our present app is a huge Visual
Basic beast that takes a user through an entire tax preparation session.
One of our competitors is using a Java/JavaScript combo that very
nice--if your browser is one of the 4.0's. The big $64k question is, can
I do such a huge Web project in Perl? With our VB app the user goes
through scores of forms, i.e., this is a long, sustained data management
task. In addition, come tax crunch time, such a site will get
potentially mega hits. What do you think about Java servlets,
Python/ZOPE? BTW, what do the grown-ups use, i.e., Excite, Yahoo? How do
I argue against MS/ASP/IIS etc.etc.? If Perl, then what strategy to
avoid the old CGI max-out? Is a Linux/Apache/Perl solution solid
security-wise? I have this silly dream of staying clear of SatanWare. .
. .
Sorry to be so desperate and general, but the walls are beginning to
move inward.
--
Larry Bottorff / mrprenzl@midusa.net / 316.345.3387
------------------------------
Date: Mon, 6 Sep 1999 16:50:47 -0400
From: "Floyd Morrissette" <Floyd@NewWebSite.com>
Subject: editing images with perl
Message-Id: <37d42908@calwebnnrp>
Somebody I know is interested in being able to use perl to edit an
image. I was wondering if this could even be done. Please take a look at
this site http://198.173.33.250/signs/display.asp?temptype=WE If you
choose one of the templates you are sent to a form to fill in
information you would like to have on the sign and then you can preview
the changes before requesting that the sign be made. I know that site is
using ASP. But I was wondering if perl could do it. If perl can, is
there a resource I can read to find out how to do it.
Thanks
Floyd
------------------------------
Date: Mon, 06 Sep 1999 12:51:13 -0700
From: Robert F <robert.l.flaugherREMOVE@trw.com>
Subject: Emacs Freezes Editing Perl Scripts
Message-Id: <37D41B30.47CE1689@trw.com>
Has anyone else run into a problem with Emacs locking up while editing
Perl scripts?
I'm running Perl 5.005_02 and GNU Emacs 20.2.3 under Solaris OS 5.6
using the cperl-mode commands shown below in my .emacs file.
Emacs is locking up intermittently while I edit various Perl scripts.
It's unpredictable and I can't repeat the problem (although it happens
frequently). It does stop when I remove the cperl-mode code.
Does anyone have any ideas on what's causing it or how I can try and
determine what's causing it? Thank you.
;;
;; Cperl-mode
;;
;; 9/2/99: comment this out to see if it fixes lock-up problem I've been
having.
(setq load-path (cons (expand-file-name "~/lisp") load-path))
(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl
programs" t)
(setq cperl-hairy t)
(setq cperl-indent-level 4)
(setq auto-mode-alist (append '(("\\.\\([pP][Llm]\\|al\\)$" .
perl-mode)) auto-mode-alist ))
;;
;; Use to correct ^M problem
;;
(require 'comint)
(add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m)
------------------------------
Date: 6 Sep 1999 16:50:56 -0400
From: hile@cse.psu.edu (Coy A Hile)
Subject: Re: Emacs Freezes Editing Perl Scripts
Message-Id: <7r19fg$ag8$1@zerg.cse.psu.edu>
In article <37D41B30.47CE1689@trw.com>,
Robert F <robert.l.flaugherREMOVE@trw.com> wrote:
>Has anyone else run into a problem with Emacs locking up while editing
>Perl scripts?
>
>Does anyone have any ideas on what's causing it or how I can try and
>determine what's causing it? Thank you.
>
best solution i know of is NOT to use Emacs. Use pico or vi instead
--
Coy Hile
hile@cse.psu.edu
"Theirs not to reason why; theirs but to do...."
Tennyson, "Charge of the Light Brigade"
------------------------------
Date: 6 Sep 1999 21:28:46 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Emacs Freezes Editing Perl Scripts
Message-Id: <7r1bme$qfn$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Robert F
<robert.l.flaugherREMOVE@trw.com>],
who wrote in article <37D41B30.47CE1689@trw.com>:
> Has anyone else run into a problem with Emacs locking up while editing
> Perl scripts?
>
> I'm running Perl 5.005_02 and GNU Emacs 20.2.3 under Solaris OS 5.6
> using the cperl-mode commands shown below in my .emacs file.
>
> Emacs is locking up intermittently while I edit various Perl scripts.
> It's unpredictable and I can't repeat the problem (although it happens
> frequently). It does stop when I remove the cperl-mode code.
WIth 20.3 all the problems I have seen are CPerl problems, not
Emacs-proper problems (as typical with 20.2). Are you sure you have
the latest version of CPerl? 4.24 fixed the last major problem I know of.
Is the hang interruptable with C-g?
Ilya
------------------------------
Date: Mon, 6 Sep 1999 18:39:53 -0400
From: "Floyd Morrissette" <Floyd@NewWebSite.com>
Subject: Re: Hopefully on-topic CGI question: simple db routine works stand-alone but not as CGI.
Message-Id: <37d442a6@calwebnnrp>
>
> [Mon Sep 6 12:20:42 1999] [error] [client 192.168.0.1] Premature end
> of script headers:
/home/cbarry/public_html/cgi-bin/phone-number-database.cgi
> ndbm store returned -1, errno 13, key "some-guy" at
> /home/cbarry/public_html/cgi-bin/phone-number-database.cgi line 14.
>
>
>
>print <<PRINT_END;
>Content-type: text/html
Should be Content-type: text/html\n\n;
------------------------------
Date: 6 Sep 1999 16:09:36 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how to make sort() case insensitive?
Message-Id: <slrn7t8bhq.lh1.abigail@alexandra.delanet.com>
[L] Vicious! (baal@c2i.net) wrote on MMCXC September MCMXCIII in
<URL:news:2XBy3.1414$I5.142252@juliett.dax.net>:
$$ Hi, simple question, the sort() function sorts the contents of an array in
$$ this order a-z then A-Z (and then 0-9 I think, but thats not too important).
$$ Is there a way to make the function case insensitive (a=A - z=Z)?
RTFM
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 6 Sep 1999 16:12:36 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how to make sort() case insensitive?
Message-Id: <slrn7t8bne.lh1.abigail@alexandra.delanet.com>
[L] Vicious! (baal@c2i.net) wrote on MMCXCI September MCMXCIII in
<URL:news:xeTy3.1619$I5.177628@juliett.dax.net>:
$$ Actually I agree, but the could you do me a favour. I run Win98, and when I
$$ run 'perldoc -f sort' there is no way to actually read the stuff. |more
$$ doesn't work either and I coulnd find any page switches, neither can I write
$$ the results to a file using >sort.txt. Suggestions? Thnx for helping, by the
$$ way! (o:
Get an OS with some real tools. What's the point of having an OS
if it doesn't have a simple pager?
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 6 Sep 1999 15:09:43 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: how to make sort() case insensitive?
Message-Id: <MPG.123ddb7694ea80fd98970c@nntp1.ba.best.com>
Abigail (abigail@delanet.com) seems to say...
> [L] Vicious! (baal@c2i.net) wrote on MMCXCI September MCMXCIII in
> <URL:news:xeTy3.1619$I5.177628@juliett.dax.net>:
> $$ Actually I agree, but the could you do me a favour. I run Win98, and when I
> $$ run 'perldoc -f sort' there is no way to actually read the stuff. |more
> $$ doesn't work either and I coulnd find any page switches, neither can I write
> $$ the results to a file using >sort.txt. Suggestions? Thnx for helping, by the
> $$ way! (o:
>
>
> Get an OS with some real tools. What's the point of having an OS
> if it doesn't have a simple pager?
Na, that something with the perldoc on Windows. Perldoc pages when
printing modules, but doesn't when printing -f -q requests. It's a
pain. I use BASH shell and it works fine.
But the original poster should make their command.com window 50 lines by
default, set pager=notepad or some such thing and perldoc perlfunc.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Mon, 06 Sep 1999 16:33:19 -0400
From: Barry Hemphill <ubu@easynet.ca>
Subject: HTML::Parse and HTML::FormatText??
Message-Id: <37D4250F.6A64339C@easynet.ca>
Well, I started off looking for a nice simple way to strip tags from
HTML pages for an indexer (I eventually used Tom Christiansen's
striphtml), and some searches at Deja.com returned all kinds of
references to HTML::Parse and HTML::FormatText - I found HTML::Parser,
but it's really not the same thing. Of course, I couldn't find either on
CPAN (or anywhere else) for love or money. Kind of bizarre, I thought.
More searching and reading (I try to do that before posting so as to
look at least a bit less like an idiot), and I find references to
HTML::Parse being deprecated (although it's still listed in
http://www.perl.com/CPAN/modules/00modlist.long.html ), and I guessed
that this might be the case with HTML::FormatText as well. I also found
HTML::Formatter listed on 00modlist.long.html, but as with the above I
can't find the actual module.
I have a reasonably up to date perl installation (5.005.03), with LWP
5.44, and CPAN seems to indicate that HTML::Format(ter|Text) should be
included in LWP. Frankly, I'm pretty much baffled. Can anyone give me a
general update on these HTML manipulation/formatting modules? Is
HTML::Parse gone? Is HTML::FormatText gone as well? Does HTML::Formatter
exist?
Any pointers or suggestions appreciated.
Thanks in advance,
Barry
------------------------------
Date: Mon, 6 Sep 1999 15:06:22 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: HTML::Parse and HTML::FormatText??
Message-Id: <MPG.123ddab78bb23f5998970b@nntp1.ba.best.com>
Barry Hemphill (ubu@easynet.ca) seems to say...
> Well, I started off looking for a nice simple way to strip tags from
> HTML pages for an indexer (I eventually used Tom Christiansen's
> striphtml), and some searches at Deja.com returned all kinds of
> references to HTML::Parse and HTML::FormatText - I found HTML::Parser,
> but it's really not the same thing. Of course, I couldn't find either on
> CPAN (or anywhere else) for love or money.
http://cpan.valueclick.com/modules/by-module/HTML/
look at libwww-perl
Then take a look at HTML::TokeParser. I think it's really an easy way
to extract the html parts you want.
Learn about using CPAN.pm. I don't know much about it, but it makes
module intallation really easy.
%perl -MCPAN -e shell
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: 6 Sep 1999 15:54:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: mysql interview
Message-Id: <slrn7t8am5.lh1.abigail@alexandra.delanet.com>
George Reese (borg@imaginary.com) wrote on MMCXCVII September MCMXCIII in
<URL:news:xGQA3.224$96.12158@ptah.visi.com>:
$$ Abigail <abigail@delanet.com> wrote:
$$ : George Reese (borg@imaginary.com) wrote on MMCXCVII September MCMXCIII in
$$ : ~~ You have no basis of making such a claim, and it is a completely
$$ : ~~ absurd statement. The book is a good book.
$$
$$ : It has your name on it. How can it be?
$$
$$ You have no idea who I am and no meaningful experience with anything I
$$ have done. So how can you possibly make such an observation?
You are absolutely correct. The code and postings I've seen from you
the past 6 or 7 years were not at all meaningful.
I have no reason to assume that your books will be meaningful.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 06 Sep 1999 22:51:47 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: mysql interview
Message-Id: <7AXA3.308$96.21438@ptah.visi.com>
Marcel Grunauer <marcel.grunauer@lovely.net> wrote:
: Well, in light of previous "meaningful experiences" with your
: handiwork, I hope you didn't write your book with Perl in mind, but,
: say Python, or Java.
: In this case I bid you good riddance.
Newsflash: it is a book on MySQL and mSQL. It was not written with any
particular language in mind.
Each chapter written for the API of a specific language was, oddly
enough, written with that language in mind. Go figure.
--
George Reese (borg@imaginary.com)
http://www.imaginary.com/~borg
"The dead know only one thing: it's better to be alive"
-Joker in Full Metal Jacket
------------------------------
Date: Mon, 06 Sep 1999 22:53:42 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: mysql interview
Message-Id: <WBXA3.309$96.21438@ptah.visi.com>
Abigail <abigail@delanet.com> wrote:
: George Reese (borg@imaginary.com) wrote on MMCXCVII September MCMXCIII in
: <URL:news:xGQA3.224$96.12158@ptah.visi.com>:
: $$ Abigail <abigail@delanet.com> wrote:
: $$ : George Reese (borg@imaginary.com) wrote on MMCXCVII September MCMXCIII in
: $$ : ~~ You have no basis of making such a claim, and it is a completely
: $$ : ~~ absurd statement. The book is a good book.
: $$
: $$ : It has your name on it. How can it be?
: $$
: $$ You have no idea who I am and no meaningful experience with anything I
: $$ have done. So how can you possibly make such an observation?
: You are absolutely correct. The code and postings I've seen from you
: the past 6 or 7 years were not at all meaningful.
I doubt you have seen anything of mine except LPC code. And my
postings apparently do not fit in with your petlanguage.
: I have no reason to assume that your books will be meaningful.
You are clearly lacking in reasoning ability then.
--
George Reese (borg@imaginary.com)
http://www.imaginary.com/~borg
"The dead know only one thing: it's better to be alive"
-Joker in Full Metal Jacket
------------------------------
Date: Mon, 06 Sep 1999 22:54:55 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: mysql interview
Message-Id: <3DXA3.310$96.21438@ptah.visi.com>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
: I would say your ridiculous two week campaign of trolling this time
: last year would be sufficient basis:
: From: George Reese <borg@imaginary.com>
: Subject: Re: Perl & Java - differences and uses
: Date: 10 Sep 1998 00:00:00 GMT
: Message-ID: <MpFJ1.544$E9.1882388@ptah.visi.com>
: Perl has no real use. If you have to do scripting or text processing,
: use Python. Otherwise, use Java.
That's a troll? No, it is an honest opinion in response to an honest
question. The fact that it does not mesh with your world view is not
my problem.
--
George Reese (borg@imaginary.com)
http://www.imaginary.com/~borg
"The dead know only one thing: it's better to be alive"
-Joker in Full Metal Jacket
------------------------------
Date: Mon, 06 Sep 1999 22:18:15 GMT
From: Michael J Devellano <michaeld@netcom.ca>
Subject: Newbie - Which version Should I Use
Message-Id: <B8XA3.119485$5r2.179884@tor-nn1.netcom.ca>
I don't know if I'm mentally challenged, but I want to learn to use PERL 5 -- which version
should I be downloading to start?
My ISP server is UNIX but I'm running on MS Win 98 and publishing via FTP to my site's cgi-bin
Thanks to anyone kind enough to clarify for me
michaeld@netcom.ca
------------------------------
Date: Mon, 6 Sep 1999 18:36:03 -0400
From: "Floyd Morrissette" <Floyd@NewWebSite.com>
Subject: Re: Newbie - Which version Should I Use
Message-Id: <37d441b4@calwebnnrp>
Michael J Devellano wrote in message ...
>I don't know if I'm mentally challenged, but I want to learn to use PERL
5 -- which version
>should I be downloading to start?
>
>My ISP server is UNIX but I'm running on MS Win 98 and publishing via
FTP to my site's cgi-bin
If you want to run perl on your own pc then you need perl for win32 from
activestate.com If you want to run the scripts as cgis then you should also
get a web server such as Apache. The scripts you write will also run on the
unix server with some minor path changes.
------------------------------
Date: 6 Sep 1999 20:28:36 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: non oop style
Message-Id: <7r185k$3n1$1@gellyfish.btinternet.com>
On Mon, 06 Sep 1999 17:28:54 GMT Jimmy Humphrey wrote:
> I was wondering where I could learn to convert code that uses oop (like
> below in a CGI.pm example) to function based code, and maybe the other
> way around. Use the code below if you want to help explain how I could
> do it.
>
> Jimmy
>
> $query = new CGI;
> $filename = $query->param('uploaded_file');
> $type = $query->uploadInfo($filename)->{'Content-Type'};
> unless ($type eq 'text/html') {
> die "HTML FILES ONLY!";
> }
The differences between the procedural and OO interfaces are described
in detail in the CGI.pm manpage - however it boils down to
use CGI qw(:standard); #import standard symbols
You dont need the $query = new CGI;
then remove all of the uses of the object reference ($query->...).
Having removed the 'new CGI' you could of course just run it at
the command line and fix the lines that give you a:
Can't call method "%s" on an undefined value at ...
error :)
And there you have it.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 06 Sep 1999 20:26:27 GMT
From: webmuse@my-deja.com
Subject: Re: PITFALLS: Access97 to SQL Server 7.0 info
Message-Id: <7r181a$6fr$1@nnrp1.deja.com>
Hello,
Another one to add to the list of Access -> SQL Server pitfalls!
I am CC'ing this to the comp.lang.perl.misc group because it
deals with Win32::ODBC specifically.
FYI, the full pitfalls thread can be found here:
http://x24.deja.com/viewthread.xp?AN=520694820.1
-------------------------------------------------------------
When using Perl with Access and Win32::ODBC, you might
have used the trick of "cloning" a database connection,
like this:
$db = new Win32::ODBC("your DSN");
$db2 = new Win32::ODBC($db);
This still works with SQL Server, however you may run into
problems if you attempt to use both objects together, for
example, in a WHILE loop:
while ($db->FetchRow)
{
my $id = $db->Data("id");
$db2->Sql("SELECT * FROM MyTable WHERE id = $id");
}
When you make a call to $db2 in that while loop, you will
receive an error from SQL that says:
"Connection is busy with results for another hstmt"
To get it to work, you will need to stop using the cloning method:
$db = new Win32::ODBC("your DSN");
$db2 = new Win32::ODBC("your DSN");
If, like me, you have hundreds of scripts all over the
place that use this cloning technique, you could cheat
a little bit and modify the 'new' function in Win32::ODBC.
This module has remained stable for more than 2 years now,
so it should not be a problem to modify it directly.
I haven't tried this yet, but it should be a simple change.
There is an IF/ELSE clause that looks like this:
if (ref $DSN){
@Results = ODBCClone($DSN->{'connection'});
}else{
@Results = ODBCConnect($DSN, @Results);
}
Just change the second line to use the DSN of the
given object, instead of the actual object, like so:
if (ref $DSN){
@Results = ODBCConnect($DSN->{'DSN'}, @Results);
}else{
@Results = ODBCConnect($DSN, @Results);
}
You will lose a little speed I suppose, but nothing
too noticeable (especially compared to the amount of
time it takes to connect to an Access database versus
a SQL Server database).
Hope this helps. Someone please correct me if I'm wrong
about something here. This info is just from my personal
experience, not in depth knowledge of how Win32::ODBC works.
-thomas
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 06 Sep 1999 20:52:26 GMT
From: webmuse@my-deja.com
Subject: Re: PITFALLS: Access97 to SQL Server 7.0 info
Message-Id: <7r19i6$7d8$1@nnrp1.deja.com>
> If, like me, you have hundreds of scripts all over the
> place that use this cloning technique, you could cheat
> a little bit and modify the 'new' function in Win32::ODBC.
> This module has remained stable for more than 2 years now,
> so it should not be a problem to modify it directly.
>
> I haven't tried this yet, but it should be a simple change.
> There is an IF/ELSE clause that looks like this:
>
> if (ref $DSN){
> @Results = ODBCClone($DSN->{'connection'});
> }else{
> @Results = ODBCConnect($DSN, @Results);
> }
>
> Just change the second line to use the DSN of the
> given object, instead of the actual object, like so:
>
> if (ref $DSN){
> @Results = ODBCConnect($DSN->{'DSN'}, @Results);
> }else{
> @Results = ODBCConnect($DSN, @Results);
> }
Ahhh I left this part out:
To complete the change, you should also replace the
line that says
$self->{'DSN'} = $DSN
with this:
if (ref $DSN){
$self->{'DSN'} = $DSN->{'DSN'};
}else{
$self->{'DSN'} = $DSN;
}
-thomas
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 06 Sep 1999 20:25:40 GMT
From: xdiv@hotmail.com
Subject: Playing .au or .wav file?
Message-Id: <7r17vr$6fk$1@nnrp1.deja.com>
Is there a module for playing a .au or .wav file from perl running on
Win98? (I'm using 5.005_03 build 518 from ActiveState).
Or, failing that, is there some freeware program that I can system()
from my script to play the file? (I tried "\Windows\Mplayer.exe /Play",
but it leaves the Mplayer up after it plays the file.)
Thanks,
Adam
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 5 Sep 1999 15:39:37 +0200
From: "Nando" <nando@tetecma.com>
Subject: R: Help Please: reading email
Message-Id: <ruVA3.91056$6C.202122@typhoon.libero.it>
Ronald E Jeffries <ronERASEjeffries@ERASEacm.org> wrote in message
37d050a6.30479457@news.det.ameritech.net...
> Is there some way to install the included PM without going through the
> make?
>
> So I'm now wondering what else I have to have on my system to install
> CPAN modules, and how to do it.
>
> As always, pointing me to the right docs will be sufficient, more
> direct help will be welcome.
>
Well, if you are running Perl on a Win32 platform try
http://www.activestate.com
Once you installed the executable, use the PPM command to install a lotta
modules without make.
On of them is Net::POP3.
--
Fernando
------------------------------
Date: 6 Sep 1999 21:00:06 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: shebang question for Win32 Perl/Apache
Message-Id: <7r1a0m$3nu$1@gellyfish.btinternet.com>
On Fri, 03 Sep 1999 11:03:18 GMT Allan M. Due wrote:
>
> c:\usr\local\bin\perl
>
> starts up perl just fine but
>
> c:/usr/local/bin/perl
> does not.
>
Yes but this is because the stupid command interpreter uses the / as its
switch character - this is a behaviour of the command interpreter and
not DOS itself which does the have the ability to use either path
separator - I've posted about this before so I wont go on ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Sep 1999 21:27:14 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Size
Message-Id: <7r1bji$3oa$1@gellyfish.btinternet.com>
On Thu, 02 Sep 1999 16:09:11 GMT Jimmy Humphrey wrote:
> Like, the size in bytes of an image somebody is uploading before I write
> it to file.
>
Read in the CGI.pm manpage about 'uploadInfo'.
And dont start another thread next time.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 6 Sep 1999 16:56:07 -0400
From: "Floyd Morrissette" <Floyd@NewWebSite.com>
Subject: Re: Win95 Perl interpretor
Message-Id: <37d42a47@calwebnnrp>
Its the one that says perl for win32 or something like that. Definitely says
win32
Jonathan Stowe wrote in message <37d3e783_2@newsread3.dircon.co.uk>...
>Erik Jørgensen <eri-joer@online.no> wrote:
>> Where can I find the Win95 Perl interpretor?
>>
>
><http://www.activestate.com>
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
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 724
*************************************