[13521] in Perl-Users-Digest
Perl-Users Digest, Issue: 930 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 28 14:32:57 1999
Date: Tue, 28 Sep 1999 11:05:16 -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: <938541915-v9-i930@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 28 Sep 1999 Volume: 9 Number: 930
Today's topics:
Absolute or Relative paths? garry_stewart@veritasdgc.com
Re: Absolute or Relative paths? <rootbeer@redcat.com>
Re: Advice wanted: Creating an .exe <bivey@teamdev.com>
Re: array & textfield??! <hks3@usa.net>
Re: array & textfield??! <siberian@nospam.siberian.org>
cgi calendar <ytliu@cgi-factory.com>
Re: cgi calendar <ytliu@cgi-factory.com>
Re: cgi calendar <gellyfish@gellyfish.com>
DBD::Pg + SELECT not working (Scott McMahan)
Re: Deleting spaces in a string <tech@tburg.net>
Re: Deleting spaces in a string <flavell@mail.cern.ch>
Re: Do you now an affordable Perl editor for Windows NT (Deviant Freak)
Re: Expert question: wrapping a subroutine (Anno Siegel)
Re: Help! How do I set a date field to empty via ODBC? <sariq@texas.net>
HELP: bug reporting script needed (Lu Wang)
How to append an extension to a value in a variable <yngwie@home.com>
Re: How to append an extension to a value in a variable <crdevilb@mtu.edu>
JAPH (was Re: remove the html tag in the file) <aqumsieh@matrox.com>
Line-wrap <azielke@hotmail.com>
Re: Match and escape processing <aqumsieh@matrox.com>
New book: Automating Windows With Perl (Scott McMahan)
NT CreateService from Perl <kristian@netscape.com>
Re: OLE and csv files in Excel <jeff@vpservices.com>
Pathetic Question for the Newbie (Lord Mokole)
Re: Perl Module for MS Access? jdkronicz@my-deja.com
Re: Perl Module for MS Access? jdkronicz@my-deja.com
persistent connection to db <ethanc@congruency.com>
Piping a file to STDIN of a Perl function <cingram-at-pjocs-dot-demon-dot-co-dot-uk>
Piping <nihad@yahoo.com>
Re: Please compare and contrast C and Perl. <neil@pacifier.com>
Re: Please compare and contrast C and Perl. (Scott McMahan)
Re: Please compare and contrast C and Perl. <rootbeer@redcat.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 28 Sep 1999 16:33:39 GMT
From: garry_stewart@veritasdgc.com
Subject: Absolute or Relative paths?
Message-Id: <7sqql2$d98$1@nnrp1.deja.com>
I have checked the FAQ's for answers to this question, but I was unable
to find any answers.
In the process of developing our Web Site, previous developers have
created several perl scripts that have hard-coded paths inside of them.
Some of which are used as part of reference documents and others which
point to other perl scripts. ie:
"http://intranet/cgi-bin/someone/ascript.pl"
I can't help but think this will lead to problems, especially if we want
to have a development area, test area and production area for these
scripts. I don't want to have to edit the scripts and modify the
paths regularly.
Aside from the obvious method of writing a module that sets a bunch of
variables once and then calls functions like getBasePath()... are there
any other techniques that are better?
Is there a perl standard? Are relative paths better?
Thanks,
Garry Stewart
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 28 Sep 1999 10:58:57 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Absolute or Relative paths?
Message-Id: <Pine.GSO.4.10.9909281055400.17231-100000@user2.teleport.com>
On Tue, 28 Sep 1999 garry_stewart@veritasdgc.com wrote:
> In the process of developing our Web Site, previous developers have
> created several perl scripts that have hard-coded paths inside of
> them. Some of which are used as part of reference documents and others
> which point to other perl scripts. ie:
> "http://intranet/cgi-bin/someone/ascript.pl"
>
> I can't help but think this will lead to problems, especially if we
> want to have a development area, test area and production area for
> these scripts. I don't want to have to edit the scripts and modify
> the paths regularly.
You're right. But (unless I've misunderstood you) this isn't a
Perl-specific issue; this would be just the same even if your programs
were written in FORTRAN or Ada. Perhaps you want to check the docs, FAQs,
and newsgroups about CGI programming and related issues.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 28 Sep 1999 16:16:59 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: Advice wanted: Creating an .exe
Message-Id: <01bf09cd$1602ef60$3527e1ce@bill.jump.net>
Michael de Beer <madebeer@igc.apc.org> wrote in article
<APC&1'0'50775dcb'682@igc.apc.org>...
> I'm not familiar with creating perl standalone .exe files.
>
> You could bundle up your own version of perl, that include LWP, and have
> a .bat file that runs that version on your script.
>
> In the unix world various companies do this so their perl scripts will
> always work. They sometime rename the executable to ${name}perl.
>
> -Mike
That might work, but I don't think I could get it past the
customer. I did just try PerlApp and, as far as file size
goes, at least the result fits on a floppy :-) Unfortunately,
the result doesn't work properly, so... MSVC++ here I come, I
guess. -Wm
------------------------------
Date: Wed, 29 Sep 1999 01:27:55 +0800
From: "HKS" <hks3@usa.net>
Subject: Re: array & textfield??!
Message-Id: <37f0fb27.0@news.highway1.com.au>
oh...not, where i can find it?.... thx
Michael de Beer ¼¶¼g©ó¤å³¹ ...
>Have you read the docs that came with CGI.pm ?
>
>-Mike
------------------------------
Date: Tue, 28 Sep 1999 10:55:03 -0700
From: John Armstrong <siberian@nospam.siberian.org>
Subject: Re: array & textfield??!
Message-Id: <37F0FFFD.C2DC8793@nospam.siberian.org>
At your favorite shell type :
perldoc CGI
Enjoy
J
HKS wrote:
> oh...not, where i can find it?.... thx
>
> Michael de Beer *¶*g©ó€å31 ...
> >Have you read the docs that came with CGI.pm ?
> >
> >-Mike
------------------------------
Date: Tue, 28 Sep 1999 10:11:01 -0700
From: "Yutung Liu" <ytliu@cgi-factory.com>
Subject: cgi calendar
Message-Id: <7sqlom$gna$1@jetsam.uits.indiana.edu>
How do we define the date in a cgi calendar? Is there any special formula
for doing it?
--
Your Sincerely,
Yutung L.
------------------------------
Date: Tue, 28 Sep 1999 10:40:21 -0700
From: "Yutung Liu" <ytliu@cgi-factory.com>
Subject: Re: cgi calendar
Message-Id: <7sqnfm$gth$1@jetsam.uits.indiana.edu>
The whole calendar. For example, for the whole month or whole year.
--
Your Sincerely,
Yutung L.
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:37f0dece_1@newsread3.dircon.co.uk...
> Yutung Liu <ytliu@cgi-factory.com> wrote:
> > How do we define the date in a cgi calendar? Is there any special
formula
> > for doing it?
> >
>
> You mean like localtime() ? I am not quite clear what you mean.
>
> /J\
> --
> "They're called Virgin Trains because they don't go all the way" -
> Simon Hoggart, The Guardian
------------------------------
Date: 28 Sep 1999 16:51:54 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: cgi calendar
Message-Id: <37f0e41a_1@newsread3.dircon.co.uk>
Yutung Liu <ytliu@cgi-factory.com> wrote:
> The whole calendar. For example, for the whole month or whole year.
>
See for instance:
<http://www.deja.com/threadmsg_ct.xp?AN=525574177&fmt=text>
/J\
--
"Michael Ancram, you haven't got a hope in hell of winning the next
election" - Huw Edwards, BBC News
------------------------------
Date: Tue, 28 Sep 1999 17:13:35 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: DBD::Pg + SELECT not working
Message-Id: <3H6I3.241$hs.15796@monger.newsread.com>
I've got DBD:Pg up and running on my Linux box. I can use it with no
problems -- connect to database, do SQL, and then close the connection. I
create tables, insert, select, drop tables, etc.
BUT: When I do a SELECT of two fields from a table, and get the arrayref
to the results, *both* columns are the first field. I can get the second
field if it is the only field in the select statement, so the data is
there, but the select will not work with both fields.
I've never used Postgres before, and don't have any other databases to
test with, so I don't know if this is a DBI config error, a DBD::Pg error,
or what. The psql interpreter works okay, so it must have something to
do with the Perl interface.
Where do I even start trying to figure this out?
Scott
------------------------------
Date: Tue, 28 Sep 1999 12:36:14 -0400
From: "Robert W. Byrd" <tech@tburg.net>
Subject: Re: Deleting spaces in a string
Message-Id: <37F0EE7E.110A173E@tburg.net>
Rich wrote:
>
> Why don't you provide a link to the stupid faq then.
> Stupid!
>
I'm going to go out on a limb on this one, but I fairly sure that even
me, the "newest regular newbie" in this newsgroup, has an authoritative
answer for this question.
type the following:
perldoc perlfaq4
then press the <ENTER> key.
That is the link you are after, right there on your very own hard drive.
.rob.
--
Robert W. Byrd | Completely Computer Friendly
tech@tburg.net | 67-B Oxford St., Tillsonburg, ON CA N4G 2G3
------------------------------------------------------------
Nothing clever here }|{ ereh revelc gnihtoN
------------------------------
Date: Tue, 28 Sep 1999 18:19:59 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Deleting spaces in a string
Message-Id: <Pine.HPP.3.95a.990928181813.22229A-100000@hpplus01.cern.ch>
On Tue, 28 Sep 1999, Rich wrote:
> Why don't you provide a link to the stupid faq then.
If you've got Perl, it's on your stupid hard disk, stupid.
If you haven't, why are you here, stupid?
> Stupid!
Indeed you are, but the Jeopardendum gave it away. (Thanks EB!).
------------------------------
Date: Tue, 28 Sep 1999 17:30:09 GMT
From: DeviantFreak@yahoo.com (Deviant Freak)
Subject: Re: Do you now an affordable Perl editor for Windows NT
Message-Id: <37f0f95f.3938669@nntp.ix.netcom.com>
On Tue, 28 Sep 1999 01:29:39 GMT, "Eric Dubreuil"
<ericdub@sympatico.ca> wrote:
>I just need cheap, freeware or chareware editor that could do code identing
>and/or keywords coloring and stuff like that. I'm looking for an editor that
>would be just a little more programmer friendly that Wordpad...
Search tucows for EditPlus. It has features like macros, syntax
highlighting, line numbering, etc., which I find very helpful.
-DF-
------------------------------
Date: 28 Sep 1999 15:18:29 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Expert question: wrapping a subroutine
Message-Id: <7sqm85$80h$1@lublin.zrz.tu-berlin.de>
Johan Vromans <JVromans@Squirrel.nl> wrote in comp.lang.perl.misc:
>A problem I recently encountered and haven't been able to solve yet...
>
>I use a module, but I'd like to change one of its subroutines.
>Basically, I want to redefine the subroutine (that's no problem) but
>then call the original subroutine from the new one. This way I can
>prepare subroutine parameters and manipulate the subroutine result
>without the need to change the calls everywhere.
Sure. You can alias the given sub to a typeglob:
*given_orig = \&given;
You may want to do this in a begin block to make sure it has
happened before it is called. Then redefine
sub given {
my @param = @_;
# Prepare stuff, modifying @param (say)
my $result = given_orig( @param); # Call the original
# modify $result
return $result;
}
>Hypothetical example:
>
> use File::Basename;
You probably meant to say File::Spec here.
> sub File::Spec::catdir {
> my $p0 = "/var/tmp/" . shift;
> my $ret = original_File::Spec::catdir ($p0, @_);
> $ret =~ s|\\|/|g;
> $ret;
> }
>
>It is no option to call it under a different name, since
>File::Spec::catdir may be called from a lot of places, calls that are
>beyond my control. And _all_ calls need to be affected.
>
>I have the feeling that careful manipulation of the symbol tables
>should make this possible, but I haven't been succesful until now. And
Well, the File::Spec case is a little different because it
inherits from a number of OS-specific classes. In principle
it should be even easier to override a method, but I can't be
bothered to figure out how to do it without losing portability.
Not before I need it myself, that is :)
Anno
------------------------------
Date: Tue, 28 Sep 1999 11:30:28 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Help! How do I set a date field to empty via ODBC?
Message-Id: <37F0ED24.B2474E92@texas.net>
<snipped Lin Parkh's off-topic post, and Jonathan Stowe's on-topic
response (except that he answered the off-topic question)>
Lin Parkh wrote:
>
> As an especial irony -- given your critique of me -- I just checked
> comp.databases.ms-access (where I crossposted) and found no reply there as
> opposed to here. Go figure.
So that somehow makes your off-topic post on-topic? If I asked for the
best recipe for roasting penguin (with apologies to Abigail) in this
group, and someone answered, does that make the question on-topic?
> Lin Parkh <lparkh1@ix.netcom.com> wrote in message
> news:7spjks$akt@dfw-ixnews13.ix.netcom.com...
> > Jeez, cut me some slack.
> > I've been on usenet for 15 years
I don't believe that someone who has "been on usenet for 15 years"
would:
A) Post Jeopardy style, with the response placed before the quoted
test.
B) Quote the entire text of a post (including sigs) whether it's
germaine to the response or not.
- Tom
------------------------------
Date: 28 Sep 1999 17:50:11 GMT
From: luwang@sol1.lrsm.upenn.edu (Lu Wang)
Subject: HELP: bug reporting script needed
Message-Id: <7sqv4j$q7m$1@netnews.upenn.edu>
Hello all. I'm in urgent need of a comprehensive Perl bug reporting
script, anyone know where I can find one? I've tried all the perl FAQs,
and sites like Matt's Script
Archive(http://www.worldwidemart.com/scripts/), but couldn't find any.
I'd much appreciate your help.
Thanks.
Regards,
Lu.
------------------------------
Date: Tue, 28 Sep 1999 17:18:55 GMT
From: David <yngwie@home.com>
Subject: How to append an extension to a value in a variable
Message-Id: <37F0F7F4.814666E1@home.com>
I need to add an extension (.wav) to a scaler variable value.
Something like:
$filename = hello
$extension = ".wav"
$value = $filename + $extension
------------------------------
Date: 28 Sep 1999 17:39:52 GMT
From: "Colin R. DeVilbiss" <crdevilb@mtu.edu>
Subject: Re: How to append an extension to a value in a variable
Message-Id: <7squh8$rqj$1@campus3.mtu.edu>
David <yngwie@home.com> wrote:
> I need to add an extension (.wav) to a scaler variable value.
> Something like:
> $filename = hello
> $extension = ".wav"
> $value = $filename + $extension
perldoc perlop
look for the word ``concatenate''--which is the operation of putting
appending one string to another.
hint: it isn't ``+''...``+'' is arithmetic addition via conversion to
numbers.
Colin DeVilbiss
crdevilb@mtu.edu
------------------------------
Date: Tue, 28 Sep 1999 11:04:08 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: JAPH (was Re: remove the html tag in the file)
Message-Id: <x3yg0zzulg7.fsf_-_@tigre.matrox.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
> print "Just another Perl hacker,"
It seems to me that JAPHs should contain a \n at the end, since one
would normally sign:
Just another Perl hacker,
<one's name>
similar to
Sincerely,
<one's name>
but it doesn't. Any good reason for this?
print "Just another wannabe Perl hacker,"
--Ala
------------------------------
Date: Tue, 28 Sep 1999 19:24:05 +0200
From: A Zielke <azielke@hotmail.com>
Subject: Line-wrap
Message-Id: <37F0F9B5.13C8CE8@hotmail.com>
Hi,
I´ve read a Ascii-file into a scalar and want to split the text into
lines that are $n characters long. I would like to keep existing \n
and don´t want to split words. (Words, that are longer than $n chars
should sit on a single line - I don´t expect that to happen very often.)
$n will be something in the range of 70-80.
I tried to fit it all into a single s///g but failed miserably.
(My best try was s/(.{40,$n})[ \r\t\f]/$1\n/g , but that obviously
splits
up lines that are longer than 40 but shorter than $n chars followed by
a \n...)
Thanks for all hints.
A.
------------------------------
Date: Tue, 28 Sep 1999 11:12:46 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Match and escape processing
Message-Id: <x3yemfjul1t.fsf@tigre.matrox.com>
Brett.A.Hunsaker@usace.army.mil writes:
> A simple question - I would think the following statement would
> always be true:
>
> $xyz =~ m/$xyz/
I can see how a newbie would easily be fooled by this. But, as you
discovered, special vars in $xyz will throw you off. You have to
disable the special meaning of those vars. The following, however,
will always be true:
$xyz =~ /\Q$xyz/;
Read perlre for more info.
HTH,
--Ala
------------------------------
Date: Tue, 28 Sep 1999 17:19:48 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: New book: Automating Windows With Perl
Message-Id: <UM6I3.247$hs.15796@monger.newsread.com>
http://autoperl.skwc.com
I don't want to blatantly advertise, but I want to get the word out.
There hasn't been much buzz about this book since its release Sept. 1,
so I wanted to let the Perl community know it had been published.
I have a new book called Automating Windows With Perl. The URL above
is the web site I created for the book. If you buy a copy through it,
I get a little kickback from Amazon.com -- believe me, no one makes any
money writing books, in fact they lose it if you consider spending the
same amount of time web programming or something.
Some people on this group may be using Windows, either voluntarily or
under coercion, and some may just want ammunition to use to recommend
against Windows. I'm not a Windows bigot, pro or con (I've done most
of my Perl programming since the time I wrote the book on a Linux box,
ironically). I just wrote a book about some programs and techniques I
learned through trial and error while using Windows. If you're
using Perl with Windows, it might be worth checking out.
Scott
------------------------------
Date: Tue, 28 Sep 1999 10:47:46 -0700
From: John Kristian <kristian@netscape.com>
Subject: NT CreateService from Perl
Message-Id: <37F0FF42.B10F0AE4@netscape.com>
How can I call the CreateService and DeleteService functions in the Windows
NT Platform SDK, from Perl? Is there a module that exports equivalent Perl
subroutines?
The current version of libwin32
<http://www.perl.com/CPAN-local/modules/by-module/Win32API/> supports
StartService, StopService and GetStatus, but not (as far as I can tell)
CreateService or DeleteService. I didn't find anything more at ActiveState
<http://www.activestate.com/ActivePerl/docs/>. Did I miss it?
If I don't find anything useful, I might write a Perl module. Would you use
it, too?
------------------------------
Date: 28 Sep 1999 16:06:38 GMT
From: Jeff Zucker <jeff@vpservices.com>
To: Rui Miguel Machado <Rui.Machado@nad.alcatel.pt>
Subject: Re: OLE and csv files in Excel
Message-Id: <37F0E5C4.666DF684@vpservices.com>
Rui Miguel Machado wrote:
>
> I would like to know how to open a .csv file in Excel via OLE and Perl.
> I manage to open regular .xls files but in this case I don't know how to
> treat the file.
If the file is named with a .csv extension, then simply opening it and
using it like any .xls file will work fine. For example:
my $app = Win32::OLE->new('Excel.Application')
or die Win32::OLE->LastError();
$app->{'Visible'} = 0;
my $wbook = $app->Workbooks->Open("c:\\docs\\test.csv")
or die Win32::OLE->LastError();
etc, just as you would for an excel format file ...
--
Jeff
------------------------------
Date: Tue, 28 Sep 1999 16:44:05 GMT
From: lord_mokole@hell.com (Lord Mokole)
Subject: Pathetic Question for the Newbie
Message-Id: <37f0eef6.301704@news.erols.com>
I'm trying to write my first CGI in Perl; this is also the first
experience I've had with Perl. I know where Perl is located on the
Unix host, and I can run my scripts using the compiler when I put the
file on the host, but I don't understand how to link the file to
cgi-lib.pl as well. Essentially, the only way I can get to run the
program is including "/usr/local/bin/perl" and my webmaster tells me
that the only way to run CGI is to use the stdin parser cgi-bin.pl
located at "/var/www/cgi-bin". Can anyone tell me how exactly I'm
supposed to get this to work.
Example (all be it pathetic):
#!/usr/local/bin/perl
print "Content-type:text/html\n\n";
print "<HTML><HEAD><TITLE>Bleh</TITLE></HEAD><BODY>\n";
print "<H2>God damn I'm Nasty!</H2></BODY></HTML>";
How would I use the cgi parser with this file?? Thanks for your help
in advance.
Lord Mokole
------------------------------
Date: Tue, 28 Sep 1999 17:04:54 GMT
From: jdkronicz@my-deja.com
Subject: Re: Perl Module for MS Access?
Message-Id: <7sqsfc$en4$1@nnrp1.deja.com>
Thanks for your info ... very helpful .... I'm a few more notches up the
learning curve.
JDK
In article <7s67j7$31e$1@gellyfish.btinternet.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> In comp.lang.perl.misc jdkronicz@my-deja.com wrote:
> > Thanks to you and Eric for the responces. Just to clarify ... are you saying
> > that using both DBD::ODBC and Win32::ODBC are suitable to use if I'm going to
> > switch to a more robust database later or just DBD::ODBC?
> >
>
> DBD::ODBC allows you to switch to another DBI driver by switching the connect
> string - it will also mean that your application will be portable to other
> OS. To the DBI module ODBC is just another type of database - you supply
> the DSN as part of the connect string. Also when you use a DBD driver for
> another database sunch as Informix or Sybase you are using the native
> database libraries as near as directly as you get without going through
> the ODBC drivers first. With Win32::ODBC you always use ODBC (obviously)
> and of course it is not portable to other OS ...
>
> > Secondly, (please pardon the simplicity of the question) what do you mean
> > when you say that they are both available from the active state repository?
> > Does that mean that they are inherently a part of recent versions of Perl?
> >
>
> Neither DBI (and the various DBD::* drivers) nor Win32::ODBC are part of
> the standard Perl distribution - they have to be installed separately.
>
> If you have Activeperl then you can install straight off the net by using
> the Perl Package Manager (PPM) e.g. :
>
> C:\>PPM INSTALL DBD-ODBC
>
> There are instructions for using PPM with the documentation the comes with
> the Activestate Perl - you can also what modules are available for
> installation in this manner via <http://www.activestate.com/packages>.
>
> > Last question- I am constructing a website on my webhosts server. If I find
> > a module that does some things I like would I want my webhost to install it
> > or could I just upload it to my directory tree on there server? My webhost
> > (Burlee) seems to be somewhat inresponsive to individual requests. They take
> > the attitude that they will upgrade or whatever when they deem it is time.
> > And based on that and my general lack of understanding in regards to using
> > modules, I'm not sure if I'm going to have a problem.
> >
>
> Because both Win32::ODBC and DBD::ODBC contain some binary XS components
> they will need to be installed properly (probably using PPM). I think
> that a case can be made for installing these modules if your Hosting
> Provider needs some persuasion as it does add value to the service ...
> of course you will in all probability have to persuade them to set up
> the DSN anyway. A spot of bribery will often help .
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 28 Sep 1999 17:11:21 GMT
From: jdkronicz@my-deja.com
Subject: Re: Perl Module for MS Access?
Message-Id: <7sqsrd$f41$1@nnrp1.deja.com>
Thanks for your thoughtful responses. They were very helpful.
In article <7s67j7$31e$1@gellyfish.btinternet.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> In comp.lang.perl.misc jdkronicz@my-deja.com wrote:
> > Thanks to you and Eric for the responces. Just to clarify ... are you saying
> > that using both DBD::ODBC and Win32::ODBC are suitable to use if I'm going to
> > switch to a more robust database later or just DBD::ODBC?
> >
>
> DBD::ODBC allows you to switch to another DBI driver by switching the connect
> string - it will also mean that your application will be portable to other
> OS. To the DBI module ODBC is just another type of database - you supply
> the DSN as part of the connect string. Also when you use a DBD driver for
> another database sunch as Informix or Sybase you are using the native
> database libraries as near as directly as you get without going through
> the ODBC drivers first. With Win32::ODBC you always use ODBC (obviously)
> and of course it is not portable to other OS ...
>
> > Secondly, (please pardon the simplicity of the question) what do you mean
> > when you say that they are both available from the active state repository?
> > Does that mean that they are inherently a part of recent versions of Perl?
> >
>
> Neither DBI (and the various DBD::* drivers) nor Win32::ODBC are part of
> the standard Perl distribution - they have to be installed separately.
>
> If you have Activeperl then you can install straight off the net by using
> the Perl Package Manager (PPM) e.g. :
>
> C:\>PPM INSTALL DBD-ODBC
>
> There are instructions for using PPM with the documentation the comes with
> the Activestate Perl - you can also what modules are available for
> installation in this manner via <http://www.activestate.com/packages>.
>
> > Last question- I am constructing a website on my webhosts server. If I find
> > a module that does some things I like would I want my webhost to install it
> > or could I just upload it to my directory tree on there server? My webhost
> > (Burlee) seems to be somewhat inresponsive to individual requests. They take
> > the attitude that they will upgrade or whatever when they deem it is time.
> > And based on that and my general lack of understanding in regards to using
> > modules, I'm not sure if I'm going to have a problem.
> >
>
> Because both Win32::ODBC and DBD::ODBC contain some binary XS components
> they will need to be installed properly (probably using PPM). I think
> that a case can be made for installing these modules if your Hosting
> Provider needs some persuasion as it does add value to the service ...
> of course you will in all probability have to persuade them to set up
> the DSN anyway. A spot of bribery will often help .
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 28 Sep 1999 17:53:11 +0200
From: "ciprut ethan" <ethanc@congruency.com>
Subject: persistent connection to db
Message-Id: <7sqo9h$3an$1@news.netvision.net.il>
Hi,
Im using the mod_perl in the Apache,
Im trying to make a persistent connection to a Postgres db,
i use
use vars qw($conn);
$conn ||= Pg::connectdb(....
But i am making a new connection again and again instead of
just in the first time,
Any Idea how i shold make it work ?
--
Regards,
ciprut ethan
------------------------------
Date: Tue, 28 Sep 1999 18:47:46 +0100
From: "Clyde Ingram" <cingram-at-pjocs-dot-demon-dot-co-dot-uk>
Subject: Piping a file to STDIN of a Perl function
Message-Id: <938540885.16643.0.nnrp-03.9e98e5bc@news.demon.co.uk>
I have defined a Perl function in a module, which reads its STDIN and does
some processing.
Thats fine if I invoke the Perl function from a Perl script which is itself
called from the shell like:
script.pl textfile
because the contents of textfile are supplied to STDIN of the perl script,
which passes this on to STDIN of the Perl function.
But what I want to pipe a file into a Perl function, form the middle of a
Perl script? Surely this is easy?
Or is this not the Perl way? i.e., would I be better to modify my function
to explicitly open the textfile.
Thanks in advance,
Clyde
------------------------------
Date: Tue, 28 Sep 1999 17:33:14 GMT
From: <nihad@yahoo.com>
Subject: Piping
Message-Id: <rv1uuqsi3i524@corp.supernews.com>
Trying to execute a a compiled CGI within a perl script while
passing inputs to the compiled CGI, I'd like to use open();
here is the code
$excgi = "/usr/blah/cgi-bin/somecgi.cgi";
open (PIPE, "$execgi|") || print "$?";
while (<PIPE>) {
print PIPE "input1=value1";
print PIPE "input2=value2";
}
I got the $execgi to parse and output correctly, the problem is
I can't pass any input to it.
Thanks in advanced for your help.
BTW, I do not want to use open2,open3, or pipe().
------------------ Posted via CNET Help.com ------------------
http://www.help.com/
------------------------------
Date: 28 Sep 1999 07:50:08 PST
From: Neil <neil@pacifier.com>
Subject: Re: Please compare and contrast C and Perl.
Message-Id: <37f0d5a0.0@news.pacifier.com>
> Thats not a question that sounds like we're being asked to do someones
> homework ...
No, I am not a student -- though I do have a political philosophy degree
where we did not discuss much Perl. I work full time as a webmaster, and
I am taking a night course in C programming which is a lot of fun.
Since I am learning C and I follow c.l.p.m. with the intention of learning
more Perl when I have time, I am curious about the similarities and
differences between the languages. It is pure intellectual curiosity.
Thanks
Neil
------------------------------
Date: Tue, 28 Sep 1999 17:26:01 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: Please compare and contrast C and Perl.
Message-Id: <JS6I3.252$hs.15796@monger.newsread.com>
Neil (neil@pacifier.com) wrote:
> Please compare and contrast the two languages.
Perl is closer to abstract human thought.
C is closer to the instructions for making a peanut-butter-and-jelly
sandwich.
Both are useful, in the right situation.
Scott
------------------------------
Date: Tue, 28 Sep 1999 10:47:29 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Please compare and contrast C and Perl.
Message-Id: <Pine.GSO.4.10.9909281039180.17231-100000@user2.teleport.com>
On 27 Sep 1999, Neil wrote:
> Subject: Please compare and contrast C and Perl.
>
> Please compare and contrast the two languages.
They are similar in that, when one has learned both, their differences are
quite obvious. Their major difference is that, when you don't know both,
you will find it difficult to see how they compare.
Oh, and you may (or may not) find this page useful.
http://www.perl.com/pub/language/versus/
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
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 930
*************************************