[10375] in Perl-Users-Digest
Perl-Users Digest, Issue: 3968 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 13 21:07:13 1998
Date: Tue, 13 Oct 98 18:00:19 -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 Tue, 13 Oct 1998 Volume: 8 Number: 3968
Today's topics:
Re: accessing instance variables (David Alan Black)
Re: ARRAYS!!!!!!!!!! <rootbeer@teleport.com>
Bug? eof not portable? <dwc3q@cs.virginia.edu>
Re: Bug? eof not portable? <dwc3q@cs.virginia.edu>
Re: Bug? eof not portable? <zenin@bawdycaste.org>
Re: Creating an unreadable perl executable <rootbeer@teleport.com>
Re: Creating an unreadable perl executable <zenin@bawdycaste.org>
Re: email with windows 98 perl script? <rick.delaney@shaw.wave.ca>
Re: encryption (Joergen W. Lang)
environment variables and persistency <awarren@inprise.com>
exit code... (Alan Su)
Install Fails - so does my attempt to get on newgroup <denniscook@erols.com>
Re: London.pm - Changed URL <eashton@bbnplanet.com>
Re: NET::FTP problem <Savage.Ron.RS@bhp.com.au>
Net::Ping WON'T WORK!!!!! <RATNER@VAIX.NET>
perl compile problem <johnga@primenet.com>
Re: Perl Cookbook - is this the best perl book? (Mike Stok)
Re: Perl Cookbook - is this the best perl book? (Larry Rosler)
perlQt: error in loading shared libraries <w12211@email.mot.com>
Perlscript + IIS + DBI + ODBC + SqlServer pgweiss@my-dejanews.com
Re: Redirecting stdout cause data lost <rootbeer@teleport.com>
web_store.cgi <zeit@cheerful.com>
Re: web_store.cgi <rootbeer@teleport.com>
Win32 Net::FTP trouble <kin@omni.c-cube.com>
Re: Win32 Net::FTP trouble <Savage.Ron.RS@bhp.com.au>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 13 Oct 1998 20:32:24 -0400
From: dblack@pilot.njin.net (David Alan Black)
Subject: Re: accessing instance variables
Message-Id: <700reo$d9$1@pilot.njin.net>
Hello -
reesor@peoplescape.com writes:
>I'm positive I must be doing something wrong here, but I sure don't see it. If
>anyone has ideas, I'd love to hear them. My news access is via dejanews, so a
>direct answer would be appreciated.
># I have a class like this:
>sub new {
> my($class) = shift;
> my($self) = {};
> my($arg) = @_;
> self->{arg} = $arg;
> self->{foo} = NULL;
You mean $self->...
[snip]
>sub bar
>{
> my($self) = shift;
> my($firstTry) = $self->{foo};
> print "firstTry: $firstTry\n"; # prints NULL
> my($secondTry) = getFoo();
> print "secondTry: $secondTry\n"; # prints correct value
Since the constructor sets $self->{foo} to NULL, why isn't
NULL the correct value? Can you post some driver code that
fails in the way you describe?
David Black
dblack@pilot.njin.net
------------------------------
Date: Tue, 13 Oct 1998 23:03:35 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: ARRAYS!!!!!!!!!!
Message-Id: <Pine.GSO.4.02A.9810131557180.1979-100000@user2.teleport.com>
On Tue, 13 Oct 1998, Graham McMillan wrote:
> Newsgroups: comp.lang.perl.misc, comp.lang.perl
If your news server still lists comp.lang.perl as an active newsgroup,
replace your news admin. That group is defunct. When it was active, Kevin
Costner was still thought of as a promising film director.
> Subject: ARRAYS!!!!!!!!!!
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> I'm trying to create a program that will read from a text file and print
> in a text field in a form. I have all the arrays declared like this:
>
> open(textfile, "file.txt");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
Most people agree that it's better style to name filehandles with all
caps. If you ask perl to warn you about suspicious code, it'll remind you
of this.
> chomp(@lines = <textfile>);
> close(textfile);
> ($foo1,$foo2,$foo3,$foo4,$foo5,$foo6)=split(/:/,$lines[1]);
Okay, if that's what you want....
> now I will have all I want is to have 1 variable by it's self (the one
> above has 6).
Do you mean that you want an array rather than a list of variables? Or do
you mean that you really needed only one of those six variables? Your
request is unclear.
> I want to print one that will just print one variable
> from the @lines array.
Maybe you want to print $lines[1]? Or maybe $lines[0]? But it's not at all
clear to me what you're really wanting.
If you can't see what you want in the Perl docs, you could try asking
again. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 13 Oct 1998 19:21:05 -0400
From: David Coppit <dwc3q@cs.virginia.edu>
Subject: Bug? eof not portable?
Message-Id: <Pine.WNT.4.03.9810131916380.268-100000@legacy.cs.virginia.edu>
Here's a small script. The script prints itself fully on Solaris with Perl
5.004_01. However, on a Linux box running 5.004_03, the last paragraph is
not printed. Is this a bug, or a change from _01 to _03? Is there a good
portable workaround?
--- Begin Script ---
#!/usr/local/bin/perl
open(FILE,$0);
$/ = "\n\n";
$paragraph = <FILE>;
do
{
print $paragraph;
$paragraph = <FILE>;
}
while (!eof);
--- End Script ---
Thanks,
David
_________________________________________________________________________
David Coppit - Graduate Student coppit@cs.virginia.edu
The University of Virginia http://www.cs.virginia.edu/~dwc3q
"For I am a Bear of Very Little Brain,
and long words Bother me" - Winnie the Pooh
------------------------------
Date: Tue, 13 Oct 1998 19:49:52 -0400
From: David Coppit <dwc3q@cs.virginia.edu>
Subject: Re: Bug? eof not portable?
Message-Id: <Pine.WNT.4.03.9810131947570.268-100000@legacy.cs.virginia.edu>
The example code in my first post was incorrect. Let me try again:
Here's a small script and example file. The script prints itself fully on
Solaris with Perl 5.004_01. However, on a Linux box running 5.004_03, the
last paragraph is not printed. Is this a bug, or a change from _01 to _03?
Is there a good portable workaround?
--- Begin Script ---
#!/usr/local/bin/perl
open(FILE,"testfile");
$/ = "\n\n";
$paragraph = <FILE>;
do
{
print $paragraph;
$paragraph = <FILE>;
}
while (!eof(FILE));
--- End Script ---
--- Start File "testfile" ---
first paragraph
last paragraph
--- End File "testfile" ---
TIA,
David
_________________________________________________________________________
David Coppit - Graduate Student coppit@cs.virginia.edu
The University of Virginia http://www.cs.virginia.edu/~dwc3q
"For I am a Bear of Very Little Brain,
and long words Bother me" - Winnie the Pooh
------------------------------
Date: 14 Oct 1998 00:43:16 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Bug? eof not portable?
Message-Id: <908325815.543525@thrush.omix.com>
[posted & mailed]
David Coppit <dwc3q@cs.virginia.edu> wrote:
: Here's a small script and example file. The script prints itself fully on
: Solaris with Perl 5.004_01. However, on a Linux box running 5.004_03, the
: last paragraph is not printed. Is this a bug, or a change from _01 to _03?
It's a bug in _01. 5.00401 has lots of bugs. Upgrade.
: Is there a good portable workaround?
Yes. Reverse your algorithm, such as below. Also, you probably
want $/ = '' instead of "\n\n" but I could be wrong, I don't know
what your program does.
#!/usr/local/bin/perl
open(FILE, "testfile") or die $!; ## always test your system calls...
$/ = "\n\n";
while (defined ($paragraph = <FILE>)) {
print $paragraph;
}
__END__
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Tue, 13 Oct 1998 23:24:03 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Creating an unreadable perl executable
Message-Id: <Pine.GSO.4.02A.9810131615030.1979-100000@user2.teleport.com>
On Tue, 13 Oct 1998, brian d foy wrote:
> >How do I make an unreadable perl executable, (even with root
> >permissions) ? Is there some perl conversion program ?
>
> chmod 111 file.pl
Or you could use zero for the mode, to get about the same effect. :-)
I've never seen a system in which scripts (as opposed to binaries) could
be (usefully) executable without being readable. That is to say, the perl
binary still needs to be able to read the source in order to execute it.
Is there a system on which this is useful?
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 14 Oct 1998 00:21:38 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Creating an unreadable perl executable
Message-Id: <908324517.643137@thrush.omix.com>
brian d foy <comdog@computerdog.com> wrote:
: In article <36239041.C003F101@hal.ddntl.didata.co.za>, Mark Fergusson <mferg@hal.ddntl.didata.co.za> posted:
: >How do I make an unreadable perl executable, (even with root
: >permissions) ? Is there some perl conversion program ?
:
: chmod 111 file.pl
:
: however, you should consider that it's quite simple to retreive the
: source if one can execute it.
A few issues:
Plain text executables still need read permission to actually
be run on most (all?) systems.
Second, root can always change permissions on a file. This
can be made a little harder on some systems by setting file flags
(independent of permissions) as well, like this (FreeBSD):
# echo foobar > file.pl
# chmod 111 file.pl
# chflags schg file.pl
# chmod 777 file.pl
chmod: file.pl: Operation not permitted
# id
uid=0(root) 0(wheel)
# rm file.pl
override --x--x--x root/staff schg for file.pl? y
rm: file.pl: Operation not permitted
# chflags noschg file.pl
# rm file.pl
#
This still won't fully do it of course, as the user with root
access and knows what they are doing can still get past it.
Another option is putting the file on a filesystem mounted read
only so that even root can't change the flags, however root
could still remount the filesystem. Even a read only medium
such as a CDROM won't work as it could simply be mounted as
a union file system, or if that isn't supported it could read
the raw device.
Basically, don't give out the root password, don't put secure
data inside executables, and learn the details of proper encryption
methods.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Tue, 13 Oct 1998 23:23:27 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: email with windows 98 perl script?
Message-Id: <3623E286.A6B8FF1@shaw.wave.ca>
Hawkwynd (Scott Fleming) wrote:
>
> On Tue, 13 Oct 1998 16:40:54 GMT of the dragon, it was read from the
> pen of Tom Phoenix <rootbeer@teleport.com> :
>
> >
> >Probably, unless someone at Microsoft was really foolish. The docs,
> >FAQs, and newsgroups about webservers should be able to help you
> >here. Good luck!
>
> Thanks Tom,
>
> What I guess I should have posted, is - are there any *cgi scripts*
> specifically written for Windows95/98 web servers for mail handling. I
> am looking to provide a small mail service for a group of endusers.
#!/usr/local/bin/perl
$| = 1;
LOOP: {
print "Perl is not CGI!\n";
print "CGI is not Perl!\n";
$you_say = <STDIN>;
redo LOOP unless $you_say =~ /Yes, I get it now\./;
}
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Wed, 14 Oct 1998 02:58:30 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: encryption
Message-Id: <1dgvad8.gck86i1srrssgN@host016-210.seicom.net>
Larry Rosler <lr@hpl.hp.com> wrote:
> [Posted to comp.lang.perl.misc and a copy mailed.]
>
> In article <1dguxph.19aj5d81jj881qN@host036-210.seicom.net> on Tue, 13
> Oct 1998 21:53:43 +0100, Joergen W. Lang <jwl@_munged_worldmusic.de>
> says...
> > Orlando Frooninckx <Frook@mail.dma.be> wrote:
> > > does anyone have a nice encryption function example so I can crypt
> > > sentences before writing them to a file?
> >
> > look for "crypt" in the "perlfunc" manpage;
> >
> > hth, Joergen
>
> That won't help. The 'crypt' function is useful only for encrypting
> passwords. It is effective only for the first eight characters of the
> input string.
Maybe one could use something in the direction of the code below. Still
a one way effort. No chance to _de_crypt. And I guess, Orlando needs
that, too, although he did only ask for encryption.
The "Crypt::*" modules on CPAN might handle what he wants, though.
Joergen
#!/usr/bin/perl -w
$salt = "FO";
$string = "something longer than eight chars";
$length = length $string;
for ($i = 0; $i < $length; &check)
{
$substring = substr $string, $i, 8;
$temp = crypt $substring, $salt;
push @crypted, $temp;
}
$all = join "", @crypted;
print $all;
sub check
{
if ($i < $length) { $i += 8; }
else { $i += $length % 8; }
}
__END__
--
To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
------------------------------
Date: Tue, 13 Oct 1998 17:37:15 -0700
From: Amity Warren <awarren@inprise.com>
Subject: environment variables and persistency
Message-Id: <3623F23B.5C4BD97A@inprise.com>
This is a multi-part message in MIME format.
--------------BE90C2F4B75268675C8E62FF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I would like to set an environment variable when running my Perl program
under Windows 98, and have that environment variable remain
set even after the Perl program has finished running.
Below is a small program which appears to set the MyEnvVar while
the script is running, however after it exits, MyEnvVar is gone.
$ENV{"MyEnvVar"} = "MySetting";
open (SETFILE, ">settings_file") ||
die "cannot open settings_file: $!";
foreach $key (sort keys %ENV) {
print SETFILE "$key=$ENV{$key}\n";
}
I could use some help!
Thanks,
amity
--------------BE90C2F4B75268675C8E62FF
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Amity Warren
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Amity Warren
n: Warren;Amity
org: <IMG SRC="ftp://ftp.inprise.com/pub/about/logos/inpr_sm.jpg">
adr: 100 Enterpise Way;;Campus C3011;Scotts Valley;CA;95066;USA
email;internet: awarren@inprise.com
title: Integration Engineer
tel;work: (831) 431-1771
tel;fax: (831) 431-1704
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------BE90C2F4B75268675C8E62FF--
------------------------------
Date: 14 Oct 1998 00:51:16 GMT
From: alsu@soda.CSUA.Berkeley.EDU (Alan Su)
Subject: exit code...
Message-Id: <700si4$nv7$1@agate.berkeley.edu>
i'm confused about the argument to exit. here's my little test script:
#! /usr/local/perl/bin/perl
for ($i = 0 ; $i < 10 ; $i++) {
if ($pid = fork) {
wait;
print "exit code is $?\n";
}
else {
exit $i;
}
}
i expect the output of this to be:
exit code is 0
exit code is 1
exit code is 2
exit code is 3
exit code is 4
exit code is 5
exit code is 6
exit code is 7
exit code is 8
exit code is 9
instead, i get:
exit code is 0
exit code is 256
exit code is 512
exit code is 768
exit code is 1024
exit code is 1280
exit code is 1536
exit code is 1792
exit code is 2048
exit code is 2304
basically, the exit codes are being scaled by a factor of 256. now i
know i'm doing something stupid, but what is it? thanks!
------------------------------
Date: Tue, 13 Oct 1998 20:54:12 -0700
From: Dennis Cook <denniscook@erols.com>
Subject: Install Fails - so does my attempt to get on newgroup
Message-Id: <36242064.74F6@erols.com>
1) Third attemp to enter newsgroup - if someone knows why my messages
disappear, please email me: denniscook@erols.com
2) I'm trying to install perl on winnt 4.0 that I downloaded from:
ftp.activeware.com/Perl-Win32/ntperl/perl5.001m/CurrentBuild/110-i86
The download went ok, the unzip went ok - I did it in directory
c:\program files\perl5. I started a command prompt window, cd to that
directory, and type 'install'. Stops immediately with error msg:
"Can't locate NT.ph in @INC (didyou run h2ph?) at install.bat line 35."
The file NT.ph is there, and I don't know what h2ph is. Any help much
appreciated...
--
Thanks very much,
Dennis Cook
------------------------------
Date: Tue, 13 Oct 1998 23:07:29 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: London.pm - Changed URL
Message-Id: <3623DAB1.A653DD28@bbnplanet.com>
brian d foy wrote:
> i was under the impression that you got the "free beer" at any Perl
> Monger event for the donation ;)
A monger? Buy me a beer? You funny!
What do I get for an Ultra? :)
e.
After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia. - U. Eco -
------------------------------
Date: 14 Oct 1998 00:03:19 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: NET::FTP problem
Message-Id: <01bdf706$9962dee0$77ea1286@steelres-pcm657.resmel.bhp.com.au>
You might be using the ActiveState Perl V 5.005.02, which butchered a few
things. In particular, Net::FTP won't work >:(. Delete it and install the
standard distribution (seriously).
--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage
Mark Cain <mark@uninetwork.com> wrote in article
<36237318.465BD6B1@uninetwork.com>...
> I am trying to utilize the NET::FTP module in a perl solution. I can't
> identify the cause of the failure of the following script. No error
[snip]
------------------------------
Date: Tue, 13 Oct 1998 19:31:24 -0400
From: Peter J Ratner <RATNER@VAIX.NET>
Subject: Net::Ping WON'T WORK!!!!!
Message-Id: <3623E2CB.EC17790E@VAIX.NET>
I've tried to use Net::Ping in my programs, but I can't seem to get it
to work right! For some reason, no matter what protocol I use, the
server never responds (yes, I've tried MANY different servers) . I am
using the sample script given in the module itself, not one of my own
design, so there's no reason why it shouldn't work. I tried running it
on both MacPerl and Unix. On MacPerl, no response from server, on Unix,
it gives an error regarding Socket.pm and how some arguement should have
the value 16 rather than 0.
If anyone has had success with this module, I'd greatly appreciate
seeing the source or getting some input as to how to get it to work.
You can contact me at ratner@vaix.net .
------------------------------
Date: Tue, 13 Oct 1998 16:52:13 -0700
From: "John E. Garrott" <johnga@primenet.com>
Subject: perl compile problem
Message-Id: <3623E7AD.803735F2@primenet.com>
I am running Linux 2.0.35, Xfree86 3.3.2, libc6, egcs 1.03, Slackware 96
(originally :-).
I down loaded the source for perl 5.005-02. Compiled nicely. No
Errors.
Then I ran a "make test".
I get the following failures:
op/goto_xs.........FAILED at test 0
pragma/locale......FAILED at test 0
lib/anydbm.........FAILED at test 0
lib/db-btree.......FAILED at test 0
lib/db-hash........FAILED at test 0
lib/db-recno.......FAILED at test 0
lib/dumper-ovl.....FAILED at test 0
lib/dumper.........FAILED at test 0
lib/filecopy.......FAILED at test 6
lib/filehand.......FAILED at test 0
lib/io_dup.........FAILED at test 0
lib/io_pipe........FAILED at test 0
lib/io_sock........FAILED at test 0
lib/io_taint.......FAILED at test 0
lib/io_tell........FAILED at test 0
lib/io_udp.........FAILED at test 0
lib/io_xs..........FAILED at test 0
lib/ipc_sysv.......FAILED at test 0
lib/ndbm...........FAILED at test 0
lib/opcode.........FAILED at test 0
lib/open2..........FAILED at test 0
lib/open3..........FAILED at test 0
lib/ops............FAILED at test 0
lib/ph.............FAILED at test 0
lib/posix..........FAILED at test 0
lib/safe1..........FAILED at test 0
lib/safe2..........FAILED at test 0
lib/sdbm...........FAILED at test 0
lib/socket.........FAILED at test 0
I recompiled a debugging version and get this message from
xxgdb :
Program received signal SIGSEGV, Segmentation fault.
0x4002bec7 in foobar () at dlib.c:486
dlib.c:486: No such file or directory.
So far I have been unable to find any library or program that
contains dlib.c. I have read the perl documentation, done
searches on www.dejanews.com, searched through tons of
software with no luck.
Can anyone direct me to where or what dlib.c is? Or alternatively,
what can I do make perl pass its own tests?
Thanks in advance,
John
------------------------------
Date: 13 Oct 1998 23:48:01 GMT
From: mike@mike.stok.co.uk (Mike Stok)
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <700orh$6oj@news-central.tiac.net>
In article <MPG.108d6f7099de16f2989809@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
[Cc'd too]
>My guess is that you eschewed 'grep' because it requires ~< two copies of
>the array at the same time. Other than that, it would seem to be more
>efficient than repeated splices.
>
>Yes/no?
You're attributing more intelligence to me than I'm guilty of :-)
I completely forgot about grep as I got fixated on the right to left being
safer than going left to right as you traverse the array.
Oops, at least there's the old perl motto to fall back on.
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Tue, 13 Oct 1998 17:34:59 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <MPG.108d918dd16d21c698980c@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <700km0$7p214@mercury.adc.com> on 13 Oct 1998 22:36:48 GMT,
Brand Hilton <bhilton@tsg.adc.com> says...
...
> FWIW, the grep uses slightly less CPU if you don't put brackets around
> the regex.
Why would anyone prefer the BLOCK form of grep or map to the EXPR form,
if the EXPR form would do the job?
Is there an emoticon that says that this is a serious question? More
than just style and TMTOWTDI is involved, because of the minor
performance implication (which I have noted also in the past).
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 14 Oct 1998 07:50:56 +0800
From: fanhow <w12211@email.mot.com>
Subject: perlQt: error in loading shared libraries
Message-Id: <3623E760.4A72394F@email.mot.com>
Hello, Here's what I got:
[root@tjdcls01 t1]# ./t1
perl: error in loading shared
libraries
/usr/lib/perl5/site_perl/i686-linux/auto/QGlobal/QGlobal.so:
undefined
symbol: safe_hv_store__FP2hvPCcP2sv
[root@tjdcls01 t1]# pwd
/home/fanhow/perlqt/tutorial/t1
[root@tjdcls01 t1]# perl -V
Summary of my perl5 (5.0 patchlevel
4 subversion 4) configuration:
Platform:
osname=linux, osvers=2.0.34,
archname=i686-linux
uname='linux
tjdcls01.tianjin.china.css.mot.com
2.0.34 #3 tue jul 28
18:17:20 cst 1998 i686 unknown '
hint=recommended,
useposix=true, d_sigaction=define
bincompat3=n useperlio=undef
d_sfio=undef
Compiler:
cc='cc', optimize='-O2',
gccversion=2.7.2.3
cppflags='-Dbool=char
-DHAS_BOOL -I/usr/local/include'
stdchar='char',
d_stdstdio=define, usevfork=false
voidflags=15, castflags=0,
d_casti32=define, d_castneg=define
intsize=4, alignbytes=4,
usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib
libs=-lnsl -ldb -ldl -lm -lc
-lcrypt
libc=, so=so
useshrplib=false,
libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so,
d_dlsymun=undef,
ccdlflags='-rdynamic'
cccdlflags='-fpic',
lddlflags='-shared'
Characteristics of this binary
(from libperl):
Built under linux
Compiled at Oct 11 1998 14:11:12
@INC:
/usr/lib/perl5/i686-linux/5.00404
/usr/lib/perl5
/usr/lib/perl5/site_perl/i686-linux
/usr/lib/perl5/site_perl
.
[root@tjdcls01 t1]# uname -a
Linux
tjdcls01.tianjin.china.css.mot.com
2.0.34 #3 Tue Jul 28 18:17:20
CST 1998 i686 unknown
Thanks for help me out.
Howard
------------------------------
Date: Tue, 13 Oct 1998 23:21:39 GMT
From: pgweiss@my-dejanews.com
Subject: Perlscript + IIS + DBI + ODBC + SqlServer
Message-Id: <700na3$ej$1@nnrp1.dejanews.com>
I am trying to use ASP with Perlscript to access an
SqlServer database. I am using DBI/DBD with the
DBI::ODBC module to access the database. I have
turn the StartConnectionPool setting in the registry
on so that IIS will use ODBC connection pools. Here
is my problem: soon after my first page which
accesses the database, Internet Explorer will hang.
Just plain hang. Even if I try to access static
content from the server. I don't have this problem
with Netscape, just IE4. Now when I look on the
server, I see sockets open to the client in the
CLOSE_WAIT state? Does anybody have any clue as
to what is going on here?
Also, I don't seem to be able to get END blocks
reliably executed from Perlscript. For example,
here is an except from a module I use to encapsulate
database access:
package DB;
use DBI;
$connect = 0;
END {
disconnect();
}
sub connect
{
if (! $connect )
{
xwarn("connecting...\n");
$dbh = DBI->connect($main::dsn, $main::uid, $main::pwd);
$connect = 1;
}
}
sub disconnect
{
if ($connect)
{
xwarn("disconnecting...\n");
$dbh->disconnect
$connect = 0;
}
}
sub xwarn
{
local *H;
open(H, ">>$main::warnfile");
print H scalar(localtime) . " " . $_[0];
close H;
}
The idea being that I always want the connection closed
so that it returns to the connection pool. However, on
a clean exit I never see the "disconnecting" message in
the log file.
Has anyone else had any problems with END blocks?
-Paul Weiss <pgweiss@arity.com>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 13 Oct 1998 23:14:43 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Redirecting stdout cause data lost
Message-Id: <Pine.GSO.4.02A.9810131610170.1979-100000@user2.teleport.com>
On Tue, 13 Oct 1998, Poon Fung wrote:
> I have a Perl script that works fine if I print all output text to
> stdout. It also works fine if I print it to a file. However, when I
> print the text to stdout and direct the output to a file, I loss about
> 7 lines of text and the last line in the file is incomplete.
>
> Does anyone know what is the problem here? Is there any know work
> around?
It sounds as if it might be a problem related to buffering. Your system
probably doesn't buffer output to the screen, but does buffer output to a
file. When Perl quits, though, it automatically flushes all buffers, so
this shouldn't be a problem. Thus, if this is the problem, either your
Perl binary is mis-installed or mis-compiled or buggy, or your program is
crashing (in a serious way, such as running out of memory) before it can
finish normally.
Although you could force Perl to flush output as it goes, the real fix is
to repair either your code or your Perl binary. It's probably your Perl
binary, though, so start with recompiling it and making sure that that
passes all of the tests in 'make test'. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 13 Oct 1998 20:07:42 -0400
From: "Zeit" <zeit@cheerful.com>
Subject: web_store.cgi
Message-Id: <700q2l$hgf$1@ndnws01.ne.mediaone.net>
I am looking for a copy of the above mentioned script. Does anyone know
where I might find this script, if there are costs associated, etc?
Any help is greatly appreciated!! Thanks!!
zeit@cheerful.com
------------------------------
Date: Wed, 14 Oct 1998 00:36:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: web_store.cgi
Message-Id: <Pine.GSO.4.02A.9810131736100.1979-100000@user2.teleport.com>
On Tue, 13 Oct 1998, Zeit wrote:
> I am looking for a copy of the above mentioned script. Does anyone know
> where I might find this script, if there are costs associated, etc?
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 13 Oct 1998 15:41:22 -0700
From: Kin Cho <kin@omni.c-cube.com>
Subject: Win32 Net::FTP trouble
Message-Id: <cohbtng13vx.fsf@omni.c-cube.com>
I'm using the latest ActiveState Perl and libnet from cpan.
I'm trying to connect from a NT to a Solaris box.
I've included the debug output.
It appears the port # is wrong.
Could it be a problem during configuration (perl Makefile.pl)?
Thanks for any help.
-kin
Net::FTP: Net::FTP(2.33)
Net::FTP: Exporter
Net::FTP: Net::Cmd(2.11)
Net::FTP: IO::Socket::INET
Net::FTP: IO::Socket(1.1603)
Net::FTP: IO::Handle(1.1505)
Net::FTP=GLOB(0xca6d68)>>> user software
Net::FTP=GLOB(0xca6d68)<<< 331 Password required for software.
Net::FTP=GLOB(0xca6d68)>>> PASS ....
Net::FTP=GLOB(0xca6d68)<<< 230 User software logged in.
Net::FTP=GLOB(0xca6d68)>>> CWD /proj/tools/private/xaal
Net::FTP=GLOB(0xca6d68)<<< 250 CWD command successful.
Net::FTP=GLOB(0xca6d68)>>> PWD
Net::FTP=GLOB(0xca6d68)<<< 257 "/proj/tools/private/xaal" is current directory.
Net::FTP=GLOB(0xca6d68)>>> PORT 172,28,3,250,0,0
Net::FTP=GLOB(0xca6d68)<<< 500 PORT argument must be 1024 or greater.
Net::FTP=GLOB(0xca6d68)>>> PORT 172,28,3,250,0,0
Net::FTP=GLOB(0xca6d68)<<< 500 PORT argument must be 1024 or greater.
Net::FTP=GLOB(0xca6d68)>>> QUIT
Net::FTP=GLOB(0xca6d68)<<< 221 Goodbye.
------------------------------
Date: 14 Oct 1998 00:11:23 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: Win32 Net::FTP trouble
Message-Id: <01bdf707$bad38ce0$77ea1286@steelres-pcm657.resmel.bhp.com.au>
ActiveState Perl V 5.005.02 has bugs in it which are not in the standard
distribution. These bugs stop Net::FTP from working. Delete ActiveState
Perl & install the standard distribution >:(.
--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage
Kin Cho <kin@omni.c-cube.com> wrote in article
<cohbtng13vx.fsf@omni.c-cube.com>...
> I'm using the latest ActiveState Perl and libnet from cpan.
[snip]
> Net::FTP: Net::FTP(2.33)
[snip]
>
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3968
**************************************