[11734] in Perl-Users-Digest
Perl-Users Digest, Issue: 5334 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 8 21:07:33 1999
Date: Thu, 8 Apr 99 18:00:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 8 Apr 1999 Volume: 8 Number: 5334
Today's topics:
Re: Apache.pm failed to load (Tom Mornini)
capture output to a file <georgeb@xylan.com>
Re: Change File Name in application/download <gellyfish@gellyfish.com>
Danger! Near-clueless newbie with a technical question <SDC@voicenet.com>
HELP with Subsitution <dwight@trumbower.com>
Help! Missing first line..... wingo01@my-dejanews.com
Re: How do I send an email attachment with sendmail pip <gellyfish@gellyfish.com>
Re: How do I send an email attachment with sendmail pip <cassell@mail.cor.epa.gov>
Re: matching non-ordered string <jwarner@tivoli.com>
No echo on a socket connection kevin_collins@my-dejanews.com
Re: Perl5 on AIX 4.3.2 (Jeffrey Drumm)
Re: POP3 pearl script. <cassell@mail.cor.epa.gov>
Re: Privacy for slaves forced to use a proxy/firewall t <jwarner@tivoli.com>
Re: Privacy for slaves forced to use a proxy/firewall t <cassell@mail.cor.epa.gov>
SORT BY DATE (Bababozorg)
Re: SORT BY DATE (Bill Moseley)
Re: SORT BY DATE (Bob Trieger)
Re: SORT BY DATE <jglascoe@giss.nasa.gov>
Threading in Perl <swamib@netscape.com>
Re: Trouble with DBI and Oracle (Tom Mornini)
Re: Trouble with DBI and Oracle <goggiano@castillo.mfg.sgi.com>
Re: Trouble with DBI and Oracle (Darren Greer)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 9 Apr 1999 00:21:33 GMT
From: tmornini@netcom.com (Tom Mornini)
Subject: Re: Apache.pm failed to load
Message-Id: <tmorniniF9wBny.9yD@netcom.com>
J. David Eisenberg (nessus@shell5.ba.best.com) wrote:
: That's the message I get when I try to start my
: version of Apache, which does have mod_perl compiled into it.
: Apache.pm does exist in /usr/lib/perl5/5.00502/CGI.
That's CGI::Apache
-- Tom Mornini
-- InfoMania
------------------------------
Date: Fri, 09 Apr 1999 00:48:37 GMT
From: George Barrinuevo <georgeb@xylan.com>
Subject: capture output to a file
Message-Id: <370D4E64.D3D0A0CD@xylan.com>
This is a multi-part message in MIME format.
--------------876726DB29F362BC4DEF1B6B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have a question about Perl. In Bourne shell the program would look
like this:
#!/bin/sh
# capture all stdout and stderr to capture.txt file
exec > capture.txt 2>&1
Essentially, I am using "exec" from Bourne shell to capture all stdout
and stderr to a file. What would be the equivalent command in PERL? If
you reply, please forward a copy to georgeb@xylan.com since I do not
frequent these news groups often.
Thanks,
--
George Barrinuevo
Principal Software Engineer
Xylan Corporation http://www.xylan.com
georgeb@xylan.com (818)878-4739 ext. 4739
--------------876726DB29F362BC4DEF1B6B
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for George Barrinuevo
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: George Barrinuevo
n: Barrinuevo;George
org: Xylan Corp.
adr: 26679 West Agoura Road;;;Calabasas;CA;91302;USA
email;internet: georgeb@xylan.com
title: Principal Software Engineer
tel;work: (818)878-4739
tel;fax: (818)880-3505
note: http://www.xylan.com
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------876726DB29F362BC4DEF1B6B--
------------------------------
Date: 8 Apr 1999 23:01:18 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Change File Name in application/download
Message-Id: <7ejcfu$ne$1@gellyfish.btinternet.com>
On Thu, 08 Apr 1999 14:37:59 -0700 Ted Huntington wrote:
> Hi!
>
> In this perl script - how do I change the name of the file when down
> loading? This script gives the file the same name as the script file
> (report.pl).
>
The answer to your question is a CGI matter and would probably be better
taken up with :
comp.infosystems.www.authoring.cgi
However:
>
> File= "report.pl":
> ====================================================
> #!/dcs/bin/perl
> print "Content-type:application/download\n\n";
>
> open(INF,"/u/pub_html/reports/webreport.xls");
> @ary = <INF>;
> close(INF);
>
> foreach $line (@ary) {
> chomp($line);
> print "$line\n";
> }
I dont think that you want to do that - Its going to mess up your file.
Your .xls is almost certainly not line oriented and is probably binary.
/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: Thu, 8 Apr 1999 20:27:51 -0400
From: "Sandra Carson" <SDC@voicenet.com>
Subject: Danger! Near-clueless newbie with a technical question
Message-Id: <cRbP2.296$x4.1747@news3.voicenet.com>
Greetings all. I am new to the Perl language but pretty competent in both C
and C++ and I am trying to do some bioinformatics-oriented type programming.
I'm hoping that someone can point me in the right direction.
I want to convert an input DNA sequence file into an output file in what's
called "fasta" format. The input file may contain one or more lines of text
and line numbers as well as spaces within the DNA sequence (strings of
'ACGT' in some order). "fasta" format contains a single line at the
beginning of the file which begins with the symbol '>' and some descriptive
text (which is not actually necessary). The sequence is then given as lines
of characters, without spaces, and each line <80 characters long".
So, I want to:
a) read in a file ('filename.nuc')
b) strip any extraneous text from the beginning of the file
c) add the '>' line
d) remove spaces and line numbers from the sequence
e) output the results into a second file ('filename.seq')
Any suggestions/hints/pointers would be highly welcome.
Thanks
Sandra Carson
------------------------------
Date: Thu, 8 Apr 1999 20:56:09 -0400
From: "Dwight Trumbower" <dwight@trumbower.com>
Subject: HELP with Subsitution
Message-Id: <923619402.712647@proxy1.bigplanet.com>
I'm using the following try to replace "| spaces |" with "||" in multiple
files.. The following doesn't quite work. It only does every other instance.
ex: | | | sdffdff| | becomes || | sdffdff||. It
should be ||| sdffdff||.
Any help is greatly appreciated.
Thanks.
local $^I = '.bak'; # emulate -i.bak from the command line
local @ARGV = glob("c:\\dtdevelopment\\scripts\\csv*.txt"); # initialize
list of files
while (<>) {
s/\| *\|/\|\|/g; # string to search for and replace
print; # write it
} continue {close ARGV if eof}
--
Dwight Trumbower
Trumbower Computer Consulting
------------------------------
Date: Fri, 09 Apr 1999 00:37:09 GMT
From: wingo01@my-dejanews.com
Subject: Help! Missing first line.....
Message-Id: <7eji3k$att$1@nnrp1.dejanews.com>
I'm hoping someone could help me out. I'm just getting into perl and wrote
the following code. It seems to work fine except that it looses the very
first line of the input file. Any help would be greatly appreciated.
Thanks.
open(UPDF,"$workfile"); while (<UPDF>) { @upd=<UPDF>; } close (UPDF);
foreach $lines (@upd) { @wline = split(' ',$lines); $pg = pop(@wline);
($ls1,$ls2,$ls3,$ls4,$ls5,$ls6,$ls7,$ls8,$ls9,$ls10)=split(' ',$lines);
print "Field #1 is $ls1 and last field is $pg\n"; }
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 8 Apr 1999 22:54:47 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How do I send an email attachment with sendmail pipe
Message-Id: <7ejc3n$n9$1@gellyfish.btinternet.com>
On 08 Apr 1999 16:08:50 -0600 Greg Wimpey wrote:
> Brian Lavender <blavender@spk.usace.army.mil> writes:
>
>> I have the following code which pipes into sendmail. How do I include an
>> attachment?
>
> Since you appear to be running on a Unix-ish system, you probably have
> the "mmencode" command available for handling MIME messages. If not,
> you will need to get it (or an equivalent program), or else you must
> roll your own MIME code.
>
You have overlooked the MIME::* modules available from CPAN - I have been
using the MIME::Lite module to do attachments recently with no effort
whatsoever really.
/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: Thu, 08 Apr 1999 16:45:01 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How do I send an email attachment with sendmail pipe
Message-Id: <370D3F7D.3AF007BB@mail.cor.epa.gov>
Brian Lavender wrote:
>
> I have the following code which pipes into sendmail. How do I include an
> attachment?
>
> #!/usr/bin/perl
>
> $mailprog = '/usr/lib/sendmail';
> open (MAILOWNER, "|$mailprog -t") || die "Unable to open sendmail";
> print MAILOWNER "To: brian\@brie.com \n";
> print MAILOWNER "From: brian\@brie.com \n";
> print MAILOWNER "Subject: Your requested file!\n\n";
> print MAILOWNER "Here is the file you requested.\n";
> close (MAILOWNER);
>
> ---------------------
> Brian E. Lavender
> US Army Corps of Engineers -- Programmer / Systems Analyst
> Sacramento, CA (916) 557-6623
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
I'm not a sendmail expert, but I have the odd feeling that oyu might
want
some more sendmail options in that open statement...
But as to your question, you want MIME. Go to CPAN and check out the
Mime::Lite module.
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 08 Apr 1999 13:28:58 -0500
From: John Warner <jwarner@tivoli.com>
Subject: Re: matching non-ordered string
Message-Id: <370CF56A.97C8FF2C@tivoli.com>
Have you tried the following?
m/.*(b_[r|g]).*/
HTH
kanajan@brown.edu wrote:
> Hi,
>
> I have a regex question. I was trying to match either of the
> following:
>
> Entry: stuff,b_r,stuff,b_g,stuff
> Entry: stuff,b_g,stuff,b_r,stuff
>
> where stuff could be anything
>
> so I ended up using:
>
> ^Entry: (.*(b_r)&.*(b_g))|(.*(b_g)&.*(b_r))
>
> but I feel this is ugly. Is there a nicer way of doing this regex. If
> you have any suggestions/advice please let me know via email |
> posting.
>
> Thanks,
> jaya
--
John Warner Tivoli Systems Inc.
Sales Support Engineer 9442 Capital Of Texas Hwy North
Sales Infrastructure Group Austin, TX 78759
john_warner@tivoli.com
------------------------------
Date: Thu, 08 Apr 1999 23:15:58 GMT
From: kevin_collins@my-dejanews.com
Subject: No echo on a socket connection
Message-Id: <7ejdb9$781$1@nnrp1.dejanews.com>
Hi,
I am trying to write a simple socket daemon that will pass data via a
network port. I have the basic daemon running fine, but I need to figure out
how I can prompt the user for a password without having the password echoed to
the client.
I tried to use POSIX::setlflag on my HPUX 10.20 system, but I do not have
the setlflag.al file (though I have a lot of others in the POSIX directory).
Can I get use some escape sequence with a 'print' command instead of
manipulating the term?
Any help would be appreciated.
Please email me directly, I am not a subscriber of this news group yet.
Kevin Collins
atomik@northbay.org
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 09 Apr 1999 00:20:13 GMT
From: jdrumm@blazenetme.net (Jeffrey Drumm)
Subject: Re: Perl5 on AIX 4.3.2
Message-Id: <370d475c.178380525@news.blazenetme.net>
[posted to comp.lang.perl.misc and mailed]
On Thu, 08 Apr 1999 16:34:16 +0100, Derek Butler
<derek.butler@int-link.com> wrote:
>Has anyone managed to install and compile the source Perl5.004 code onto
>an AIX 4.3.2 system ?
>
>We are having problems compiling on this version of AIX.
>
>Regards, Derek.
I've compiled 5.005_02 on AIX 4.3.2 with no problems . . . mod_perl is
another matter, though.
Let me know how I can help.
--
- Jeff
------------------------------
Date: Thu, 08 Apr 1999 16:40:15 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: POP3 pearl script.
Message-Id: <370D3E5F.86BB83CA@mail.cor.epa.gov>
Liam Whalen wrote:
>
> This may be the wrong group but from the looks of everything here I
> think it is the right place. Fisrt off I am looking for a script that
> will open a POP3 connection to our mail server and return a list of the
> messages. Basically a hotmail for an ISP so customers can check there
> email almost anywhere. If anyone could point me to some sites that have
> some scripts I can search through please do. If no one knows of any
> script sites can someone tell me if this is possible to do in pearl?
>
> Thanks
> Liam
Assuming you mean Perl instead of pearl (which is a graphics language
IIRC),
yes. Perl can do this, and you can use Perl modules to do it easily.
Go to
CPAN and check out these modules:
Mail::POP3Client
Net::POP3
HTH,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 08 Apr 1999 14:02:08 -0500
From: John Warner <jwarner@tivoli.com>
Subject: Re: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <370CFD2F.D8C81B45@tivoli.com>
Not that it what he wants exists anyway...Stop and think about how IP works and
how an IP datagram is structured. Word 4 contains the source address and word 5
contains the destination address. Without those tidbits in the IP header, the
datagram isn't going anywhere and IP does not support encryption. (You can
however, encrypt the data portion of an IP datagram.)
In order to accomplish his mission, he needs to go through an anonymizer before
hitting his corporate firewall/proxy server where his network admin is
watching. Such animals will be non-existent (no admin right mind would allow
one to exist on his network) and be shut down promptly upon discovery (along
with giving the original poster his pink slip).
In short, it ain't happen' dude, so you might as well go back to work and stop
wasting time and bandwidth surfing the web. The computer and the network to
which it is connected belong to the company and as such, they have a right to
know how and for what purposes their equipment is being used.
Jeff Frost wrote:
> Here's a radical solution for you...
>
> Use your PeeCee at work for work instead of hunting porn or finding how your
> stocks are doing. Buy a PeeCee at home, get an ISP account and go nutz.
> What users like you don't realize is that realaudio broadcast your listening
> to, or the real-time stock ticker is clogging down network bandwidth... and
> then everyone wonders "why is the network running slow".
>
> Jeff the burned out Admin, CNE
>
> p.s. If you want advice on how to circumvent security measures, at least
> have the courtesy of going to a alt.hacking newsgroup.
>
> foj@nym.alias.net wrote in message <7eiojh$j6l$1@nnrp1.dejanews.com>...
> >
> >
> >What are the best options for people behind a company/country
> firewall/proxy
> >for browsing the web anonymously - for where the actual address the person
> is
> >visiting is not revealed in the proxy/firewall logs, and where the data
> steam
> >is encrypted from the person's computer to some external proxy?
> >
>
[stuff omitted]
> >
> >We need a method of browsing for people behind firewalls/forced-proxies
> which
> >hides both the content and any address which can allow an admin to bring up
> >what I brought up.
> >
>
[stuff omitted]
> >Anyway, if someone is aware a method of browsing from behind a
> firewall/proxy
> >which both encrypts the data and hides any inkling of the final
> destination,
> >please let me know.
> >
> >If you don't like the sex.com example, then how about cnn.com, and etc...
> >
> >Frank Johnson
> >foj@nym.alias.net
--
John Warner Tivoli Systems Inc.
Sales Support Engineer 9442 Capital Of Texas Hwy North
Sales Infrastructure Group Austin, TX 78759
john_warner@tivoli.com
------------------------------
Date: Thu, 08 Apr 1999 16:27:18 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <370D3B56.E87A2DE4@mail.cor.epa.gov>
foj@nym.alias.net wrote:
>
> What are the best options for people behind a company/country firewall/proxy
> for browsing the web anonymously - for where the actual address the person is
> visiting is not revealed in the proxy/firewall logs, and where the data steam
> is encrypted from the person's computer to some external proxy?
>
> Will SecureCRT allow an encrypted connection between a person's computer and a
> service like Anonymizer, and will it work through a company/country
> firewall/proxy?
>
> I've pondered on using Janus to encrypt the address, but that still doesn't
> hide the encrypted address from the proxy/firewall. An admin can still browse
> to the encrypted addresses I visited and see what I saw, right?
>
> We need a method of browsing for people behind firewalls/forced-proxies which
> hides both the content and any address which can allow an admin to bring up
> what I brought up.
>
> I've pondered on setting up a server which uses SSL and which pulls whatever
> content a user wants back to my server and then sends it to the person
> accessing my server. The address at the top of the browser would stay the
> same - my server would handle pulling the info the user wants, and pushing it
> out to them over the SSL connection. The fact that the address at the top of
> the browser wouldn't change would hide what's really going on - since my
> server would be the one doing all the work. Maybe there's some sort of Perl
> script that would do such a thing - bring content back to a page that will
> then be SSL encrypted.
>
> Forcing my server to do all the work is important, because, let's say, if I
> had to go to an address like https://some-secure-anonymous-browsing-
> service.com/http://www.sex.com - the Admin would still be able to see that I
> went to sex.com. If I use Janus to encrypt the address of www.sex.com, the
> admin would still be able to go to
> http://janus.ftk.de/janus_encrypted/MTARppWQRxooZte+KulEECU8F31FC0q+9mJc9kQoz
> xTR
> UacWNTbWb50rUZFXdgetII3QSek7669n0sc9quzYaWuSdUa2SI60EY22bIUU258HOQqmLrok$MnRz
> mil mAIStv0= and see the "evil" things I saw.
>
> Anyway, if someone is aware a method of browsing from behind a firewall/proxy
> which both encrypts the data and hides any inkling of the final destination,
> please let me know.
>
> If you don't like the sex.com example, then how about cnn.com, and etc...
>
> Frank Johnson
> foj@nym.alias.net
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Frank, I hate to break it to you, but *none* of the groups you posted to
is appropriate for this question. comp.lang.perl.misc is for
discussions
involivng Perl programming. Even if you say 'I want to write this in
Perl'
c.l.p.m. is still not an approrpiate place, since your question has no
direct connection to Perl. Now if you wrote a program to do this and it
didn't work right and you wanted some help with the Perl code in your
program, well then you might submit the code and the error here... But
you might get flamed just as badly for doing something which many admins
consider to be A Bad Thing.
Why on earth would you want to go browse somewhere that your employer
considers to be inappropriate? Even if the browsing constraints were
set down by Dilbert's Pointy-Haired Boss himself, that doesn't make
breaking the rules a good thing. Recently there was a case in my state
where some employees were doing this, and the company [and the
employees]
got fried bigtime on an audit. Is this really worth risking your job?
Or the jobs of your friends, in case the company goes down with you?
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: 9 Apr 1999 00:08:50 GMT
From: bababozorg@aol.com (Bababozorg)
Subject: SORT BY DATE
Message-Id: <19990408200850.07055.00000333@ng111.aol.com>
hi
can anyone please tell me how to sort my data by date.
my date is like this: 3-08-99
thanks
hamed
------------------------------
Date: Thu, 8 Apr 1999 17:20:08 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: SORT BY DATE
Message-Id: <MPG.1176e794ec264500989724@206.184.139.132>
In article <19990408200850.07055.00000333@ng111.aol.com>,
bababozorg@aol.com says...
> hi
> can anyone please tell me how to sort my data by date.
> my date is like this: 3-08-99
I'd use timelocal() to convert the date to a epoch time, push the dates
into a list and use sort().
perlfaq4 has more info, such as "How do I sort an array by (anything)?"
I guess I'd really push a reference to some structure that contains both
the date, and a reference to the data (or even the data itself) onto the
array. But that's all described in perlfaq4.
--
Bill Moseley mailto:moseley@best.com
------------------------------
Date: Fri, 09 Apr 1999 00:23:34 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: SORT BY DATE
Message-Id: <7ejh75$4cc$1@holly.prod.itd.earthlink.net>
[ courtesy cc sent by mail if address not munged ]
bababozorg@aol.com (Bababozorg) wrote:
oo->can anyone please tell me how to sort my data by date.
oo->my date is like this: 3-08-99
What have you tried?
What part of the sort documentation is giving you trouble?
Which part of the FAQ answer don't you understand?
perldoc -f sort
perlfaq4: "How do I sort an array by (anything)?
HTH,
Bob Trieger
sowmaster@juicepigs.com
------------------------------
Date: Thu, 08 Apr 1999 20:25:40 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
Subject: Re: SORT BY DATE
Message-Id: <370D4904.634E799@giss.nasa.gov>
Bababozorg wrote:
>
> can anyone please tell me how to sort my data by date.
> my date is like this: 3-08-99
presumably "3" is the month? I'll also point out,
this is a bit late in the game to be writing years
as two digit numbers.
Jay Glascoe
------------------------------
Date: Thu, 08 Apr 1999 17:02:07 -0700
From: Swaminathan Balasubramanian <swamib@netscape.com>
Subject: Threading in Perl
Message-Id: <370D437F.C6DF2ACA@netscape.com>
Where can i find info about doing Multi-threading in Perl ?
Swami
------------------------------
Date: Fri, 9 Apr 1999 00:19:40 GMT
From: tmornini@netcom.com (Tom Mornini)
Subject: Re: Trouble with DBI and Oracle
Message-Id: <tmorniniF9wBKs.9qL@netcom.com>
Darren Greer (drgreer@qtiworld.com) wrote:
: -->$drh = DBI->install_driver('Oracle');
: -->$dbh = $drh->connect($ENV{ORACLE_SID}, 'username', $pw) || die "Connect
: -->error";
: I tried this....and it does not lockup this time...but instead, errors
: out with:
: Can't connect, no database driver specified at test2.pl line 9
I connect to my Oracle DB this way:
my $dbh=DBI->connect('DBI:Oracle:db_name',$db_user,$db_pass);
^^^^^^^^^^^
I think you're missing the highlighted part!
-- Tom Mornini
-- InfoMania Printing & Prepress
------------------------------
Date: 9 Apr 1999 00:31:03 GMT
From: Dan Goggiano <goggiano@castillo.mfg.sgi.com>
Subject: Re: Trouble with DBI and Oracle
Message-Id: <7ejho7$1c9$2@murrow.corp.sgi.com>
Don't know for sure if it makes any difference, but I've always
written my connect like:
$dbh = DBI->connect($Database, $Username, $Password, $Driver)
In comp.lang.perl.modules Darren Greer <drgreer@qtiworld.com> wrote:
: Sorry for the repost: I had the subject in the wrong field:
: Howdy all....I am having problems with DBI and Oracle. Below is my
: code, to access our Database, and perform a simple query. Following
: the code, is the error I get.
: --------------------- CODE ----------------------
: #!/usr/bin/perl -w
: use DBI;
: $ENV{ORACLE_HOME} = '/usr/oracle/7.3.4';
: $ENV{TWO_TASK} = 'T:homer:QTI';
: my $dbh = DBI->connect('dbi:Oracle:','drgreer/drgreer@QTI','');
: $query = "SELECT partnumber FROM partmaster WHERE partno = '108755'";
: my $sth = $dbh->prepare($query) || die "Cant execute prepare
: statement";
: my $rc = $sth->execute || die "Cant execute statment: $DBI::errstr";
: print "$sth->{NAME}->[0]\n";
: while (@row = $sth->fetchrow_array) {
: print "$row[0]\n";
: }
: $sth->finish;
: $dbh->disconnect || warn $sth->errstr;
: --------------- END CODE --------------
: This is not much of an error, as it is more of a lock-up. This was
: run from the debugger, and below, is the point where it locks up. The
: debugger never gets past the "connect" line in the code. The
: following is where my code locks up, and sites there eating a TON of
: cpu. The process eventually has to be killed, to stop it. Any help
: or insight would be greatly appreciated.
: ------------------ ERROR -----------------
: DB<1>
: DBD::Oracle::dr::connect(/opt/perl5/lib/site_perl/DBD/Oracle.pm:206):
: 206: DBD::Oracle::db::_login($dbh, $dbname, $user, $auth)
: 207: or return undef;
: DB<1>
: ---------------------------------------------------
: Darren
--
*************************************************************
* Dan Goggiano *
* WMO I/S Programmer/Analyst *
* email: goggiano@sgi.com *
* phone: 650-933-2983 *
* pager: 650-254-9290 / goggiano_p@pager.sgi.com *
* *
* Success is a journey, not a destination. *
* Days in Tahoe for Winter 98/99 : 26 *
*************************************************************
------------------------------
Date: Fri, 09 Apr 1999 00:44:46 GMT
From: drgreer@qtiworld.com (Darren Greer)
Subject: Re: Trouble with DBI and Oracle
Message-Id: <370d4d38.256135463@news.qgraph.com>
My program still locks up in the same spot...so I am now suspecting
that there are issues with the way DBI talks with our Oracle install.
sqlplus works, the "make test" worked for DBI, and svrmgrl works as
well. But thanks for the help anyway....looks like Ill have to find
other ways to talk to ORacle,
Darren
On 9 Apr 1999 00:31:03 GMT, Dan Goggiano
<goggiano@castillo.mfg.sgi.com> wrote:
-->
-->Don't know for sure if it makes any difference, but I've always
-->written my connect like:
-->
-->$dbh = DBI->connect($Database, $Username, $Password, $Driver)
-->
-->In comp.lang.perl.modules Darren Greer <drgreer@qtiworld.com> wrote:
-->: Sorry for the repost: I had the subject in the wrong field:
-->
-->
-->: Howdy all....I am having problems with DBI and Oracle. Below is my
-->: code, to access our Database, and perform a simple query. Following
-->: the code, is the error I get.
-->
-->: --------------------- CODE ----------------------
-->: #!/usr/bin/perl -w
-->
-->: use DBI;
-->
-->: $ENV{ORACLE_HOME} = '/usr/oracle/7.3.4';
-->: $ENV{TWO_TASK} = 'T:homer:QTI';
-->
-->: my $dbh = DBI->connect('dbi:Oracle:','drgreer/drgreer@QTI','');
-->
-->: $query = "SELECT partnumber FROM partmaster WHERE partno = '108755'";
-->
-->: my $sth = $dbh->prepare($query) || die "Cant execute prepare
-->: statement";
-->: my $rc = $sth->execute || die "Cant execute statment: $DBI::errstr";
-->
-->: print "$sth->{NAME}->[0]\n";
-->
-->: while (@row = $sth->fetchrow_array) {
-->: print "$row[0]\n";
-->: }
-->
-->: $sth->finish;
-->: $dbh->disconnect || warn $sth->errstr;
-->: --------------- END CODE --------------
-->
-->: This is not much of an error, as it is more of a lock-up. This was
-->: run from the debugger, and below, is the point where it locks up. The
-->: debugger never gets past the "connect" line in the code. The
-->: following is where my code locks up, and sites there eating a TON of
-->: cpu. The process eventually has to be killed, to stop it. Any help
-->: or insight would be greatly appreciated.
-->
-->: ------------------ ERROR -----------------
-->: DB<1>
-->: DBD::Oracle::dr::connect(/opt/perl5/lib/site_perl/DBD/Oracle.pm:206):
-->: 206: DBD::Oracle::db::_login($dbh, $dbname, $user, $auth)
-->: 207: or return undef;
-->: DB<1>
-->: ---------------------------------------------------
-->
-->: Darren
-->
-->
-->--
-->*************************************************************
-->* Dan Goggiano *
-->* WMO I/S Programmer/Analyst *
-->* email: goggiano@sgi.com *
-->* phone: 650-933-2983 *
-->* pager: 650-254-9290 / goggiano_p@pager.sgi.com *
-->* *
-->* Success is a journey, not a destination. *
-->* Days in Tahoe for Winter 98/99 : 26 *
-->*************************************************************
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5334
**************************************