[7352] in Perl-Users-Digest
Perl-Users Digest, Issue: 977 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 4 19:08:16 1997
Date: Thu, 4 Sep 97 16:00:33 -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, 4 Sep 1997 Volume: 8 Number: 977
Today's topics:
"#!/path_to_perl -w" causes shell to be invoked <kipp.e.howard@boeing.com>
Re: Can I specify fonts? (Andrew Starr)
can't run Perl 5.004 on NCR 2.03.01 (Steve Manning)
change shadow on solaris ?? mgrabenstein@isinet.com
Emailing from CGI's on Win32 (Tracy Bednar)
flock() problem <zod@home.net>
Re: FormMail with file-attach (Ranson)
Re: Help! How to make http request from perl CGI? <hovnania@atc.boeing.com>
HELP: config/build problem: "Bletch" in makefile (Graduate Student)
Re: MetaInfo Sendmail (Neil Briscoe)
multi-threaded shared library -> single threaded perl <shelden@webreflection.com>
Re: NT Mail Question (Neil Briscoe)
opendir on Win95 (dmouse)
Re: Password Verification Case Sensitivity (Daniel E. Macks)
Problem dmake-ing Perl on NT. (Art Gecko)
read() vs. sysread() <wiedmann@neckar-alb.de>
security of input in reg exp? (Alex Krohn)
Re: security of input in reg exp? (Ilya Zakharevich)
Re: test CGI's wwithout uploading to ISP w/Frontpage 97 (Ranson)
Re: UTC to locale time? (Andrew Starr)
Win 95 Perl & Tk <hcorbin@erols.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 4 Sep 1997 19:31:42 GMT
From: "Kipp E. Howard" <kipp.e.howard@boeing.com>
Subject: "#!/path_to_perl -w" causes shell to be invoked
Message-Id: <340F0C9E.29D8@boeing.com>
This is a multi-part message in MIME format.
--------------6C5850F159C9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
#!/path_to_perl -w" causes shell to be invoked:
I am trying to help our administrators get all machines within our lab
up tothe same version of perl (5.003). (I know 5.004 is ready, willing
and able but we would like to wait for a few months of inernal testing
of 5.004 so we can confirm that 5.004 does not produce additional
warnings. After that time, we will definitely upgrade to 5.004. In the
mean time we would like to have 5.003 available on all platforms.)
Perl 5.003 compiles and passes all tests except lib/filehand.t (#4).
Since this was a weird test (uses ungetc), we ignored the error. We
installed perl in the following directory structure:
/site/sw/perl-5.003/bin
lib
man
When we are confident with the above install, we will update the
/site/sw/perl link to the follwoing:
/site/sw/perl -> /site/sw/perl-5.003
...so that all existing links will be updated with the above change.
/site/bin/perl -> /site/sw/perl/bin/perl
/site/bin/perldoc -> /site/sw/perl/bin/perldoc
etc..
Here is the problem:
When testing the 5.003 version on some existing perl scripts from other
platforms that used /site/sw/perl-5.003, we noticed that when the "-w"
was used in the shebang line, the script was treated as a shell script
and died on the first non-shell construct. If we took out the "-w" from
the shebang line, the script ran fine.
Below is the "-V" output and a few revelant pieces from %Config that I
thought might give someone a clue as to what is going on:
[856]$ /site/sw/perl-5.003/bin/perl -V
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=cxux, osver=6.2, archname=m88k-cxux
uname='cxux nh6 6.2 nh6-ux m88k '
hint=recommended, useposix=true, d_sigaction=define
Compiler:
cc='/bin/cc -Xa', optimize='-O1reorder -Qtarget=M88110compat',
gccversion=
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=n, randbits=15
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lld -lm -lc -lcrypt -lPW
libc=/lib/libc.a, so=none
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=, ccdlflags=''
cccdlflags='', lddlflags=''
@INC: /site/sw/perl-5.003/lib/m88k-cxux/5.003 /site/sw/perl-5.003/lib
/site/sw/perl-5.003/lib/site_perl/m88k-cxux
/site/sw/perl-5.003/lib/site_perl .
%Config = {
...
'bin' => '/site/sw/perl-5.003/bin'
'binexp' => '/site/sw/perl-5.003/bin'
...
'installarchlib' => '/site/sw/perl-5.003/lib/m88k-cxux/5.003'
'installbin' => '/site/sw/perl-5.003/bin'
'installman1dir' => '/site/sw/perl-5.003/l_man/man1'
'installman3dir' => '/site/sw/perl-5.003/l_man/man3'
'installprivlib' => '/site/sw/perl-5.003/lib'
'installscript' => '/site/sw/perl-5.003/bin'
'installsitearch' => '/site/sw/perl-5.003/lib/site_perl/m88k-cxux'
'installsitelib' => '/site/sw/perl-5.003/lib/site_perl'
...
'perlpath' => '/site/sw/perl-5.003/bin/perl'
...
'prefix' => '/site/sw/perl-5.003'
'prefixexp' => '/site/sw/perl-5.003'
'privlib' => '/site/sw/perl-5.003/lib'
'privlibexp' => '/site/sw/perl-5.003/lib'
...
'scriptdir' => '/site/sw/perl-5.003/bin'
'scriptdirexp' => '/site/sw/perl-5.003/bin'
...
'sharpbang' => '#!'
...
'startperl' => '#!/site/sw/perl-5.003/bin/perl'
...
}
Thanks for any help
--
Kipp E. Howard | Voice: (206) 662-4932
Boeing Commercial Airplanes | Fax: (206) 662-4404
P.O. Box 3707, M/S 19-MH | Stable: kipp.e.howard@boeing.com
Seattle, WA 98124-2207 | WWW:
http://www.iasl.ca.boeing.com/~keh3985
--------------6C5850F159C9
Content-Type: text/plain; charset=us-ascii; name="news"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="news"
"#!/path_to_perl -w" causes shell to be invoked:
I am trying to help our administrators get all machines within our lab up to
the same version of perl (5.003). (I know 5.004 is ready, willing and able but
we would like to wait for a few months of inernal testing of 5.004 so we can
confirm that 5.004 does not produce additional warnings. After that time, we
will definitely upgrade to 5.004. In the mean time we would like to have
5.003 available on all platforms.)
Perl 5.003 compiles and passes all tests except lib/filehand.t (#4). Since
this was a weird test (uses ungetc), we ignored the error. We
installed perl in the following directory structure:
/site/sw/perl-5.003/bin
lib
man
When we are confident with the above install, we will update the /site/sw/perl
link to the follwoing:
/site/sw/perl -> /site/sw/perl-5.003
...so that all existing links will be updated with the above change.
/site/bin/perl -> /site/sw/perl/bin/perl
/site/bin/perldoc -> /site/sw/perl/bin/perldoc
etc..
Here is the problem:
When testing the 5.003 version on some existing perl scripts from other
platforms that used /site/sw/perl-5.003, we noticed that when the "-w" was used
in the shebang line, the script was treated as a shell script and died on
the first non-shell construct. If we took out the "-w" from the shebang line,
the script ran fine.
Below is the "-V" output and a few revelant pieces from %Config that I thought
might give someone a clue as to what is going on:
[856]$ /site/sw/perl-5.003/bin/perl -V
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=cxux, osver=6.2, archname=m88k-cxux
uname='cxux nh6 6.2 nh6-ux m88k '
hint=recommended, useposix=true, d_sigaction=define
Compiler:
cc='/bin/cc -Xa', optimize='-O1reorder -Qtarget=M88110compat', gccversion=
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=n, randbits=15
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lld -lm -lc -lcrypt -lPW
libc=/lib/libc.a, so=none
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=, ccdlflags=''
cccdlflags='', lddlflags=''
@INC: /site/sw/perl-5.003/lib/m88k-cxux/5.003 /site/sw/perl-5.003/lib
/site/sw/perl-5.003/lib/site_perl/m88k-cxux /site/sw/perl-5.003/lib/site_perl .
%Config = {
...
'bin' => '/site/sw/perl-5.003/bin'
'binexp' => '/site/sw/perl-5.003/bin'
...
'installarchlib' => '/site/sw/perl-5.003/lib/m88k-cxux/5.003'
'installbin' => '/site/sw/perl-5.003/bin'
'installman1dir' => '/site/sw/perl-5.003/l_man/man1'
'installman3dir' => '/site/sw/perl-5.003/l_man/man3'
'installprivlib' => '/site/sw/perl-5.003/lib'
'installscript' => '/site/sw/perl-5.003/bin'
'installsitearch' => '/site/sw/perl-5.003/lib/site_perl/m88k-cxux'
'installsitelib' => '/site/sw/perl-5.003/lib/site_perl'
...
'perlpath' => '/site/sw/perl-5.003/bin/perl'
...
'prefix' => '/site/sw/perl-5.003'
'prefixexp' => '/site/sw/perl-5.003'
'privlib' => '/site/sw/perl-5.003/lib'
'privlibexp' => '/site/sw/perl-5.003/lib'
...
'scriptdir' => '/site/sw/perl-5.003/bin'
'scriptdirexp' => '/site/sw/perl-5.003/bin'
...
'sharpbang' => '#!'
...
'startperl' => '#!/site/sw/perl-5.003/bin/perl'
...
}
--------------6C5850F159C9--
------------------------------
Date: Thu, 04 Sep 1997 15:25:50 -0400
From: atspublic@bigfoot.com (Andrew Starr)
Subject: Re: Can I specify fonts?
Message-Id: <atspublic-ya02408000R0409971525500001@news.negia.net>
In article <340ED6DD.FE6486E6@one.net>, Gina Anderson <ginakra@one.net> wrote:
> I have a guestbook that I am currently trying to customize. I use the
> font Arial or Helvetica in all my web pages using the font face tag in
> the HTML, and the guestbook cgi outputs regular times new roman, or
> default font for the platform.
>
> Is it possible to specify a certain font output to create? I know,
> picky, picky! :)
Yes. To the same extent you can specify an HTML tag in raw HTML, you can in
your perl script as well. I don't know how to specify fonts in HTML, but
I'll use font size as a related example.
HTML:
<FONT SIZE = + 2>Hello!</FONT>
Perl:
print "<FONT SIZE = + 2>Hello!</FONT>\n";
Sometimes you have to watch out for those characters which perl treats
specially, and put a \ before it so that Perl treats it literally instead
of interpreting it the way Perl normally would.
Good luck!
-Andrew
--
Andrew Starr e-mail via http://www.amherst.edu/~atstarr
------------------------------
Date: Thu, 04 Sep 1997 21:22:44 GMT
From: manning@execpc.com (Steve Manning)
Subject: can't run Perl 5.004 on NCR 2.03.01
Message-Id: <341023f4.25204458@news.execpc.com>
I am unable to get any of the latest version of perl to compile on my
NCR 3000 system. I'd appreciate any insights.
OS: NCR Unix (SVR4) v 2.03.01
Tools: gcc 2.7.2.3,
GNU binutils v2.7
>From the pre-5.004 betas up through the current version of PERL
(5.004_03) I have been completely unsuccessful in getting things to
run. The betas at least compiled, but then failed a significant
number of checks in the test phase. All versions of 5.004 I have
tried building dump core on me immediately whe I try to run them.
I do not try to use dynamic loading, and take all the default answers
to the configuration questions
I've had to do some #defining to get things to compile cleanly, such
as defining "__NCR" so that things don't choke when including
/usr/include/sys/byteorder.h.
That include file has "asm" code in it, which I don't know how to get
GCC to accept, so I #define my way around it. Could this be my
problem?
One of the fragments from the header file is:
/*
* unsigned long htonl( hl )
* unsigned long hl;
* reverses the byte order of 'hl'
*/
/*
* muoe940661 : gmp - 01 Mar 1994
* Avoid warnings when including sys/endian.h
*/
asm unsigned long htonl( unsigned long hl )
{
%mem hl;
movl hl, %eax
xchgb %ah, %al
rorl $16, %eax
xchgb %ah, %al
clc
}
(That disk partition recently got hit, so I lost my compiled versions
and associated output. I haven't put the effort into sloughing
through the compile again to get the error messages.)
Here is the output of "myconfig":
Summary of my perl5 (5.0 patchlevel 4 subversion 3) configuration:
Platform:
osname=svr4.0, osvers=3.0, archname=3435-svr4.0
uname='mm6860 mm6860 4.0 3.0 3435 386486mc '
hint=recommended, useposix=true, d_sigaction=undef
bincompat3=n useperlio=undef d_sfio=undef
Compiler:
cc='/usr/local/sbin/gcc', optimize='-O2', gccversion=2.7.2.3
cppflags='-I/usr/include -I/usr/ucbinclude -I/usr/local/include'
ccflags ='-I/usr/include -I/usr/ucbinclude -I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=4, usemymalloc=y, randbits=15
Linker and Libraries:
ld='ld', ldflags ='-L/usr/ccs/lib -L/usr/ucblib -L/usr/local/lib'
libpth=/usr/local/lib /shlib /lib /usr/lib /usr/ccs/lib
/usr/ucblib
libs=-lnet -lsocket -lnsl -lgdbm -ldbm -ldl -lld -lm -lc -lcrypt
-lucb -lx
libc=/lib/libc.so.1, so=so
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags=''
Any help is appreciated!
Steve Manning
System Administrator
Mega Marts Inc.
Milwaukee, WI USA
manning@execpc.com
------------------------------
Date: Thu, 04 Sep 1997 17:52:39 -0600
From: mgrabenstein@isinet.com
Subject: change shadow on solaris ??
Message-Id: <873412904.13499@dejanews.com>
I am trying to rewrite the /etc/shadow file on solaris 2.5.1 machine
(in order to change the user's password).
Everytime I do all local accounts get locked out. Attempting to "su -" to
them returns an "id unknown" error. We have NIS on and NIS log ons are not
affected. Bringing up admintool and clicking the apply fixes the problem,
but I am not sure why. Anyone know ??
Any way to prevent it ??
thanks,
Mike Grabenstein
Technical Specialist, ISI
#include <std.disclaimers>
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 4 Sep 1997 20:14:56 GMT
From: spectran@netcom.com (Tracy Bednar)
Subject: Emailing from CGI's on Win32
Message-Id: <spectranEG02ww.K91@netcom.com>
Check out a program called blat! I believe it is public domain.
- T
#!/usr/bin/perl
##Just Another Perl Hacker
open(_=>${$[|$|})||die;($_=(<_>,<_>))=~s#\#+-??=??##,print;
Does anyone know how to go about sending emails from HTML froms when
your using an NT server ? I know that with unix there's that sendmail
thingy but NT (or at least my installation) dosen't have anything
comparable to shell to . The nearest i've got is to do an OLE thing with
a Win32 mail program , this is just about OK on my machine but when i
put it on the server it's going to explode .
I' m using CGI.pm with Activeware's PERL for win32 (no more than 2
months old) . Thanks in advance
Toodle-pip
Amias
------------------------------
Date: Thu, 04 Sep 1997 12:54:51 -0700
From: Farzad Mansour <zod@home.net>
Subject: flock() problem
Message-Id: <340F120B.2942BAC0@home.net>
Can someone please point out what is wrong:
Platform: Sparc 5
OS: Solaris 2.5.x
open(FILE,"< /tmp/junk");
flock(FILE,2);
Does not lock! Do I need rpc.lockd or some other thing running on my
machine?
thx,
--
Captain Zod...
zod@home.net
------------------------------
Date: 4 Sep 1997 20:53:13 GMT
From: ranson@infoave.net (Ranson)
Subject: Re: FormMail with file-attach
Message-Id: <5un73p$jj7@news1.infoave.net>
In article <873375151.3662@dejanews.com>
kultomten@hotmail.com wrote:
> Hello everybody!
> Does anyone know where to find a Form-Mail script that allows for
> attaching files that are then saved on a specified location?
This is a program I am using, hope this helps
open MAIL,"|/usr/sbin/sendmail -t -oi -oem";
print MAIL "To: $recipient\n";
print MAIL "From: $in{'emailadd'} ($in{'name'})\n";
print MAIL "Subject: Order for Morningside\n\n";
print MAIL "$in{'address'}\n";
print MAIL "$in{'city'}, $in{'state'} $in{'zip'}\n";
print MAIL "$in{'phone'}\n";
print MAIL "$in{'emailadd'}\n\n";
print MAIL "$in{'zx-comments'}\n";
if ($in{'account_no'}) {
print MAIL "\n";
open TEXT,"uuencode $path/orders/$in{'account_no'}.txt $in{'account_no'}.xyz |";
# I rename the file to .xyz here because the mail program does not
# reckonize the extention as an ascii file - so keeps it seperate from
# the email body - was a problem with netscape mail.
while (<TEXT>)
{
print MAIL $_;
}
close TEXT;
}
close MAIL;
------------------------------
Date: Thu, 4 Sep 1997 20:12:41 GMT
From: Paul Hovnanian <hovnania@atc.boeing.com>
Subject: Re: Help! How to make http request from perl CGI?
Message-Id: <340F1639.54EA9CE4@atc.boeing.com>
Mike Wong wrote:
>
> I'd like to know how to write a perl CGI script that would make an
> http request for an html document, do some stuff to the document, and
> then push the results to the browser.
>
> Writing a CGI doesn't trip me at all--but making the http
> request--that's the trick. If anyone can help me, I'd greatly appreciate
> the knowledge.
CGI is for writing servers. Check out the LWP (libwww) module.
This will assist with the client end. If this doesn't work out,
you can write simple web clients with perl sockets pretty easily.
--
Paul Hovnanian hovnania@atc.boeing.com
------------------------------------------------------------------------
If the first attempt at making a drawing board had been a failure,
what would they go back to?
Opinions the sole property of the above, available for a nominal fee.
------------------------------
Date: Thu, 04 Sep 1997 14:29:59 -0800
From: "Kent Lindquist (Graduate Student)" <kent@giseis.alaska.edu>
Subject: HELP: config/build problem: "Bletch" in makefile
Message-Id: <340F3667.4739@giseis.alaska.edu>
This is a multi-part message in MIME format.
--------------495953A04317
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I unpack perl5.004_03.tar on my Solaris 2.5 Ultra 1,
running Sun workshop cc compiler version 4.2--quite standard,
so I'd hope perl would build "out of the box."
After running Configure with the default options, make depend
creates a makefile with the following problem
( under "# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW
THIS LINE"):
perlmain.o: perl.h
config.h: Bletch: How does this C preprocessor catenate tokens?
perl.h: config.h
perl.h: embed.h
Needless to say, I don't get much further with this "Bletch" in
the makefile. The "Bletch" line appears to come from config_h.SH,
but I don't see how it got there. Older perl distributions,
attempts with gcc, various ignorant hacks to Configure etc.,
and, god forbid, searching of documentation, newsgroups, web pages
haven't gotten me very far. Any ideas out there?
Thanks,
Kent
PS Please include a copy to me via email of any response you
post--thanks
--------------495953A04317
Content-Type: text/plain; charset=us-ascii; name="myconfig"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="myconfig"
#!/bin/sh
# This script is designed to provide a handy summary of the configuration
# information being used to build perl. This is especially useful if you
# are requesting help from comp.lang.perl.misc on usenet or via mail.
if test -f config.sh; then TOP=.;
elif test -f ../config.sh; then TOP=..;
elif test -f ../../config.sh; then TOP=../..;
elif test -f ../../../config.sh; then TOP=../../..;
elif test -f ../../../../config.sh; then TOP=../../../..;
else
echo "Can't find the perl config.sh file produced by Configure"; exit 1
fi
. $TOP/config.sh
# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
# XXX Add d_sigaction (?) once it's defined.
$spitshell <<!GROK!THIS!
Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
Platform:
osname=$osname, osvers=$osvers, archname=$archname
uname='$myuname'
hint=$hint, useposix=$useposix, d_sigaction=$d_sigaction
bincompat3=$bincompat3 useperlio=$useperlio d_sfio=$d_sfio
Compiler:
cc='$cc', optimize='$optimize', gccversion=$gccversion
cppflags='$cppflags'
ccflags ='$ccflags'
stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
voidflags=$voidflags, castflags=$castflags, d_casti32=$d_casti32, d_castneg=$d_castneg
intsize=$intsize, alignbytes=$alignbytes, usemymalloc=$usemymalloc, randbits=$randbits
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
libs=$libs
libc=$libc, so=$so
useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
cccdlflags='$cccdlflags', lddlflags='$lddlflags'
!GROK!THIS!
--------------495953A04317--
------------------------------
Date: 4 Sep 1997 20:33:57 GMT
From: neilb@zetnet.co.uk (Neil Briscoe)
Subject: Re: MetaInfo Sendmail
Message-Id: <memo.19970904213356.56915H@skep.compulink.co.uk.cix.co.uk>
In article <01bcb938$87fdde00$dda3bece@DAVIDBAKER.BURNAP>,
dbaker@dkburnap.com (David Baker) wrote:
> Anyone gotten Perl to work with this manufacturer?
>
Yup. ;-))
Good job considering I'm a reseller of the product.
On NT, you can either arrange to pipe the output to
\sendmail\sendmail.exe -t or you can mail me and ask for a copy of
smtp.pl, a flagrant plagiarism of Graham Barr's work which happens to work
under NT.
Oh, this information, and the smtp.pl is offered free of charge. I'm not
a total mercenary. ;-))
Regards
Neil
------------------------------
Date: Thu, 04 Sep 1997 16:12:42 -0600
From: Brian T. Shelden <shelden@webreflection.com>
To: shelden@webreflection.com
Subject: multi-threaded shared library -> single threaded perl
Message-Id: <873407188.6971@dejanews.com>
Hi all--
A co-worker of mine created a perl module with perl
language bindings for IBM's MQSeries. It's worked fine
for months under hpux and aix. However, when we tried to
port it Solaris (2.5), it core dumped soon after it was
dynamically loaded.
The docs for MQ under Solaris claim applications using MQ
must be built with -mt. Since this means that MQ is
multi-threaded, I eventually got the module to work by
rebuilding perl as if it were multi-threaded app. In
config.sh:
cc='opt/SUNWspro/bin/cc'
ccflags='-D_REENTRANT'
libs='-lsocket -lnsl -ldl -lm -lcrypt -lthread -lc'
Note the thread library before -lc, as per intro(3).
While that does work, it seems to me to be against the
point of perl modules to require users to rebuild their
copy of perl in order to get a module to work. So I have a
few questions:
Am I doing something wrong?
Is there a better way get the module to work (aside
from rebuilding MQSeries; I don't have source for
that.)
Is it possible to at least have the DynaLoader die
gracefully by saying "hey, you need to link -lthread
into perl in order to use MQSeries..."?
Thanks,
--Brian T. Shelden I/T Specialist
shelden@us.ibm.com IBM Global Services
(914) 759-2348 (T/L 248) Sterling Forest, NY 10979
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 4 Sep 1997 20:33:52 GMT
From: neilb@zetnet.co.uk (Neil Briscoe)
Subject: Re: NT Mail Question
Message-Id: <memo.19970904213351.56915G@skep.compulink.co.uk.cix.co.uk>
In article <5ukjqh$18e@news1.infoave.net>, ranson@infoave.net (Ranson)
wrote:
>
> Forgive me, but I know little about NT servers. I need to write a progr
> am that
> is going to send mail from a perl script. Having always worked in UNIX
> the code below almost always works.
>
> Thanks in advance.
>
> Q. Does NT use sendmail? Or does NT use another mail prog. ?
>
> $mailprog = '/usr/sbin/sendmail';
>
> open (MAIL, "|$mailprog $mymail") || die "Can't open $mailprog!\n";
>
> print MAIL "Reply-to: $UserMail $UserName\n";
>
>
I've read through the answers you've thus far had to your question. You
can get a sendmail for NT, but it doesn't come with one.
I agree with the poster who said write your own sendmail lib and use that.
Its what I did. I freely admit to having plagiarised smtp.pm, by Graham
Barr, cos I couldn't get that to work under NT itself.
There are no intellectual property rights on my smtp.pl - I offer it under
the same freedoms that Perl and smtp.pm are offered. Mail me, and I'll
return you a copy of smtp.zip, which contains smtp.pl, and smtptst, a
script which shows you how to use it. If you need further tuition, you'll
have to download the Mailtools package and read its docs.
Regards
Neil
------------------------------
Date: 4 Sep 1997 20:20:38 GMT
From: gt1535b@acmey.gatech.edu (dmouse)
Subject: opendir on Win95
Message-Id: <5un56m$i3r@catapult.gatech.edu>
Has anyone ever gotten a 'Permission denied' error while trying to
opendir() a directory on Windows 95 (or NT)? I've opendir'd successfully
in other parts of the script, but when I try to do it from within
a subroutine in another package I get an error. Sound familiar to
anyone?
thanks,
Daryl
--
<>< Daryl Bowen <><
Georgia Institute of Technology
E-mail: gt1535b@prism.gatech.edu
Siemens Stromberg-Carlson Co-op
------------------------------
Date: 4 Sep 1997 20:25:26 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: Password Verification Case Sensitivity
Message-Id: <5un5fm$iqk$2@netnews.upenn.edu>
Jason (jason@ernie.liglobal.com) said:
:
: I have a web chat system running solely on perl which has case sensitive
: user id and password verification. I would rather the user be able to login
: without worrying about what case they have entered their user id in.
Use one of the perl builtins to convert everything to all upper-case
(or lowercase, or whatever) when defining the password, and then do
the same to the user's input whenever you need to check it. Or if
you're storing them in plaintext (cf. crypt() or somesuch), do a
case-insensitive match rather than a string-equality test.
dan
--
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
------------------------------
Date: 4 Sep 1997 20:37:26 GMT
From: ldaly@cs.bu.edu (Art Gecko)
Subject: Problem dmake-ing Perl on NT.
Message-Id: <5un666$afb$1@news1.bu.edu>
First, let me confess that this is probably _not_ a perl issue
per se, but I am encountering it in trying to use perl and compile
new modules.
I want to compile DBI-0.89 and DBD-ODBC. I have both Borland
C++ 5.0 and MSVC++ (naturally I'd rather use Borland.) So I try
to compile with the version of dmake that comes with the binary
distribution of perl (not the ActiveState port).
The problem I encounter is that dmake immediately dumps me into
a new instance of cmd.exe. If I type 'exit', the next line of
the makefile appears, and then it runs the shell again. If I
repeatedly type 'exit' until the compile has run through, I find
that nothing has compiled.
This occurs whether I use Borland or Microsoft as a compiler. It
also occurs when I roll my own dmake from source. It _also_ occurs
whether I try to compile a perl module, or perl itself. It does
not seem to happen with nmake, but I'd like to know why it's
happening at all rather than using MSVC++ instead.
Could someone at least point me to a possible culprit? I don't
think dmake or perl are at fault, and my copy of Borland is
fresh out of the box today. Could I have a bad install of NT
or cmd.exe?
Any suggestions are appreciated.
--Liza
--
Liza Daly liza@newmarket.net
Applications Programmer, Newmarket Network http://www.newmarket.net/
------------------------------
Date: Thu, 04 Sep 1997 21:45:57 +0200
From: Jochen Wiedmann <wiedmann@neckar-alb.de>
Subject: read() vs. sysread()
Message-Id: <340F0FF5.3CA7F1BA@neckar-alb.de>
Hello,
while working on a proxy module for DBI I encountered the following
problem: Suggest you have a client/server connection via a TCP
socket. (The problem is reproducable with pipes, btw.) The client
sends a message and executes flush().
The server does a read(), waiting for less bytes than the client
sent. (To be precise, he attempts to read the message introducer,
10 bytes or so.) But that read() doesn't return, perhaps because of
buffering. I can work around the problem by either using sfio or
executing sysread(). My problem is I cannot use sysread() because
I'd like to use the "Storable" module internally which uses
native Perl IO calls.
Is this a known problem? Any other workarounds or recommendations?
Thanks,
Jochen
--
Jochen Wiedmann wiedmann@neckar-alb.de
07123 14887
------------------------------
Date: Thu, 04 Sep 1997 22:13:44 GMT
From: alex@gossamer-threads.com (Alex Krohn)
Subject: security of input in reg exp?
Message-Id: <340f3208.90297520@news.supernews.com>
Hi,
I want to be able to allow people to put input into a reg expression
and was wondering about any security problems.
For instance, I have an expression something like
if ($item =~ /$userinput/) { blah(); }
I don't want to quote $userinput as I want it to be treated as a reg
exp. My question is, can users input ` or | or something similiar
(perhaps even close the reg exp with a /) and execute a command?
Is this safe?
Thanks,
Alex
------------------------------
Date: 4 Sep 1997 22:29:28 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: security of input in reg exp?
Message-Id: <5unco8$e82@agate.berkeley.edu>
In article <340f3208.90297520@news.supernews.com>,
Alex Krohn <alex@gossamer-threads.com> wrote:
> Hi,
>
> I want to be able to allow people to put input into a reg expression
> and was wondering about any security problems.
>
> For instance, I have an expression something like
>
> if ($item =~ /$userinput/) { blah(); }
>
> I don't want to quote $userinput as I want it to be treated as a reg
> exp. My question is, can users input ` or | or something similiar
> (perhaps even close the reg exp with a /) and execute a command?
>
> Is this safe?
/$var/ will not do double evaluation, so it will just expand $var, not
whatever is inside $var. Note however that 5.005 may have (?{...})
enabled, and one can put any Perl code inside it.
Ilya
------------------------------
Date: 4 Sep 1997 20:59:55 GMT
From: ranson@infoave.net (Ranson)
Subject: Re: test CGI's wwithout uploading to ISP w/Frontpage 97
Message-Id: <5un7gb$i8t@news1.infoave.net>
In article <340EC7ED.D5A551EF@one.net>
Gina Anderson <ginakra@one.net> wrote:
> Hello all!
>
> I have a question, I hope I am in the right newsgroup..I have also
> forwarded this question to other groups.
>
> I am just starting to use Perl 5 for making cgi programs for my web site
> (among just needing to know it period for getting a job!). I am
> planning on making a simple guestbook and stuff for now. (for any of you
> noticing my site is on AOL in my sig, that will change as soon as I
> learn this)
>
> My question is, I have Microsoft Frontpage 97 installed on my machine
> (IBM running Win 95), and Inet server, which will of course allow me to
> preview my site using links without being connected to the internet.
> BUT, I was wondering if I could set it up somehow so I could test the
> cgi programs I make. For example, as I preview my site, I could fill in
> the guestbook form, submit, and see the actual output of the cgi program
> without being connected to the internet. I would love to be able to do
> this so I wont have the headache of uploading it to my ISP's server to
> test, making changes and doing it all over again!
>
> I have Perl 5 for Windows 95/NT installed on my computer, inetsw95.exe
> is in C:\programfiles\websvr\system and Perl 5 is in D:\Perl5.
>
What I use is WebSite for windows 95 or NT - it is an ORiley product
A server that is easy to setup and use. Best of all it is fully functional
shareware.
Ranson
------------------------------
Date: Thu, 04 Sep 1997 15:37:47 -0400
From: atspublic@bigfoot.com (Andrew Starr)
Subject: Re: UTC to locale time?
Message-Id: <atspublic-ya02408000R0409971537470001@news.negia.net>
In article <34124968.127558799@news.netcologne.de>,
michael.NOSPAM@nowhere.edu wrote:
> Hi all,
>
> i want to convert a given UTC time string ("853317838") to local time
> ( 3/9/97 13:34:56). Is there a module that does this?
I'll have to learn how to make and use modules, but here is some code that
gets you close to what you want. I think you will want to get rid of the
meridian stuff I commented out below (I use it, but you seem to want
military time.)
You also seem not to need the DayNames and MonthNames, but I leave them in,
in case you or someone else wants the example.)
Then your print commnd should be:
print "( $DayofMonth/$Month/$Year $clock)\n";
Hope this helps.
-Andrew
#date gets the date for the HTML confirmation
($Second, $Minute, $Hour, $DayofMonth, $Month, $Year, $WeekDay, $DayofYear,
$IsDST) = localtime(time);
#@DayNames = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
#@MonthNames = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
'Sep', #'Oct', 'Nov', 'Dec');
$fullyear = 1900 + $Year;
#if ($Hour > 11) {
# $meridian = "PM";
# } else {
# $meridian = "AM";
#}
#if ($Hour == 0) {$Hour=12;}
#if ($Hour > 12) {$Hour=$Hour-12;}
$clock= sprintf('%02d:%02d:%02d', $Hour, $Minute, $Second);
#enddate
print "Date: $DayNames[$WeekDay], $DayofMonth $MonthNames[$Month]
$fullyear, $clock $meridian\n";
--
Andrew Starr e-mail via http://www.amherst.edu/~atstarr
------------------------------
Date: Thu, 04 Sep 1997 18:09:48 -0400
From: Harold Corbin <hcorbin@erols.com>
Subject: Win 95 Perl & Tk
Message-Id: <340F31AC.7D86@erols.com>
I have just downloaded 00402-bindist04-bc.tar.gz from
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/ports/win95/Gurusamy_Sarathy/
This is Perl5 with Tk. It seem to work well with Win95, even though the
install.bat was expecting NT.
I haven't run much yet, just the widget demo and there is only one way
to describe it - WOW, WOW!!!!!!! Thank You Gurusamy Sarathy and
everyone who helped make this available.
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". 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 977
*************************************