[17446] in Perl-Users-Digest
Perl-Users Digest, Issue: 4866 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 10 18:05:42 2000
Date: Fri, 10 Nov 2000 15:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <973897509-v9-i4866@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 10 Nov 2000 Volume: 9 Number: 4866
Today's topics:
Re: Backtick problems on Windows98 <peter.lerup@ecs.ericsson.se>
Re: CGI newbie - premature end of script headers??? <smart73_NOSPAM!!_@earthlink.net>
Re: Deamon newbee rereidy@my-deja.com
module install problems with perl2exe on solaris akcrum@my-deja.com
Re: my.cgi.suspended <me@privacy.net>
Re: my.cgi.suspended <mark-lists@webstylists.com>
Re: my.cgi.suspended (Maggert)
pack result - can someone please explain ? <bav@esn.sbs.de>
Re: Perl DBD::ODBC compilation problem on Tru64 mshemer@my-deja.com
Re: perl5porters: defined @array depricated? -- PROBLEM <tim@ipac.caltech.edu>
Re: Pushing a hash on to a stack... <jeff@yoak.com>
Random Array with Sort? <quantum_mechanic@my-deja.com>
Re: Self-modifying code in Perl (Anno Siegel)
Re: Self-modifying code in Perl <joe+usenet@sunstarsys.com>
Shell Comands ?? (=?ISO-8859-1?Q?BigB=90=90=99?=)
Re: Shell Comands ?? (Tad McClellan)
Re: Shell Comands ?? <siking@yahoo.NOSPAM>
Re: Simple regex problem <hartleh1@westat.com>
using 2 arrays in a foreach loop <theborg@usa.com>
Re: using 2 arrays in a foreach loop (John J. Trammell)
Re: using 2 arrays in a foreach loop <tim@ipac.caltech.edu>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 10 Nov 2000 21:54:20 +0100
From: "Peter Lerup" <peter.lerup@ecs.ericsson.se>
Subject: Re: Backtick problems on Windows98
Message-Id: <8uhmr7$g11$1@newstoo.ericsson.se>
Peter
You just made my day! Thanks a million!
> I have seen the same problem and in some cases the culprit seems to be
Norton
> Antivirus - if it is set to scan ALL files rather than just specified file
> types the problem crops up. Solution was simply to have Norton only scan
> nominated file types.
>
You are right, NAV is the culprit here! After unistalling it, things started
to work as expected.
> I am now struggling with the same problem where they are not running
Norton -
> something else is obviously doing the same thing - any help would be
> appreciated. Here they are running McAfee, but even when disabled the
problem
> still occurs
>
Yes, well the strange thing is that on the machines where the backticks did
work, NAV was also installed. Not to sure about possible differences in
program versions though, but will check.
I'm very grateful for your help.
BR
/Peter
------------------------------
Date: Fri, 10 Nov 2000 19:12:32 GMT
From: Stephen S. <smart73_NOSPAM!!_@earthlink.net>
Subject: Re: CGI newbie - premature end of script headers???
Message-Id: <56io0t4icsipv21p59dpqmeucpulgvira7@4ax.com>
Did you ever figure this problem out?? I have the same problem and no
one's been able to help much. I think it's some configuration problem
but haven't had any luck with that. Everybody says look at the error
logs. That's where I got this error. People say I uploaded the
script in binary instead. I wrote the script on the linux server
there was no uploading involved.
On Fri, 3 Nov 2000 23:08:22 +0100, "Tomas" <it_likes_you@yahoo.com>
wrote:
>Hi,
>
>I'm don't do well in CGI. I'm trying to make a form-to-mail cgi, but I just
>grabbed it from several tutorials. The script looks fine, but when I run it
>on a webserver, it says "Premature end of script headers"
>
>Also, I've read that you can print HTML easier when you use "print
><<EndOfHTML" so that you don't have to use the print statement everytime.
>But is the "EndOfHTML" part neccesary or can you use other thing such as
><<errorpage? And can you use EndOfHTML more than once in a script?
>
>Thanks for reading this,
>
>You can reply to this or email directly to nofunatall@tiscalinet.be
>
------------------------------
Date: Fri, 10 Nov 2000 20:08:23 GMT
From: rereidy@my-deja.com
Subject: Re: Deamon newbee
Message-Id: <8uhkjj$hvu$1@nnrp1.deja.com>
The first place to start is the book "Advanced Programming in the UNIX
environment". It has a section on writing daemons that is verty well
written and very straight forward.
Next, invest $40 on "The Perl Cookbook". This book has Perl examples of
how to create daemons, but more importantly, it has recipes for almost
everything you could want to do with Perl, along with explanations on
how to do it and how it works.
Both of the above are invaluable to me (even though I am a DBA!).
Good luck.
Ron Reidy
Oracle DBA
In article <8uh55k$3mj$1@nnrp1.deja.com>,
alphageekster@my-deja.com wrote:
> I am starting to get interested in
> perl and deamon writing. I have been
> very impressed with the responses to
> this discussion page so thought that
> I would ask if anyone has some
> refrences (on-line preferably (Im cheap))
> on the combination or just deamon writing
> on an AIX box.
>
> Thanks in advance
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 10 Nov 2000 22:00:00 GMT
From: akcrum@my-deja.com
Subject: module install problems with perl2exe on solaris
Message-Id: <8uhr4t$nnt$1@nnrp1.deja.com>
Hi -
I'm using perl2exe on a Solaris (SunOS) platform.
I'm in need of the Storable.pm module
(but this problem is not limited to a particular module).
My attempt to do 'perl Makefile.PL' as 1st step of install results in:
---
Error: Unable to locate installed Perl libraries or Perl source code.
...
(You get this message, because MakeMaker could not
find "/users/is/isingh/p2x553/SunOS/perl2exe/perl5/lib/5.00503/sun4-
solaris/CORE/perl.h")
---
I've then tried using the 'PERL_SRC' option to supply the path for
that 'perl.h' file, but the problem doesn't go away, just a different
file is not found.
I've written to IndigoStar support.
I have the latest perl2exe and CPAN Storable module.
Anyone found a solution?!
- Andrew C
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 10 Nov 2000 20:10:02 GMT
From: "EM" <me@privacy.net>
Subject: Re: my.cgi.suspended
Message-Id: <uCYO5.2795$Nw6.8446@news.iol.ie>
your using webprovider.com right?
they are a pain in the ass
here is a rather bold way of bypassing their restriction
create a file with notepad call it ".htaccess" leave quotes to prevent
notepad adding .txt
enter this in that file
#START OF FILE
DirectoryIndex /index.cgi2
AddHandler cgi-script .cgi2
#END OF FILE
now just rename extention to .cgi2
works perfectly :)
dont forget to chmod to 755 (webprovider overlooks this on .cgi but not on
.cgi2)
Eric
<xzhang3388@my-deja.com> wrote in message
news:8ugb9t$g20$1@nnrp1.deja.com...
> I have some perl cgi scripts which simply read some data files and then
> display a html page. Those cgi scripts usually work OK, but sometimes
> after an execution the web server (on UNIX) renames the executed script
> with extension ".suspended".
>
> Once this happens, the system persistently does this (to the same
> script) for hours -- even when I rename it back to original name
> manually, the system will add the ".suspended" extension it again
> within
> seconds.
>
> What could be the cause and how to prevent this? Thanks in advance.
>
> Best regards
>
> Xiaogang
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Fri, 10 Nov 2000 13:19:01 -0800
From: Mark Thompson <mark-lists@webstylists.com>
Subject: Re: my.cgi.suspended
Message-Id: <7gpo0t0uf33v7ovslrf908jv2q77sughuc@4ax.com>
Hmmmm, I was thinking that should just change his scripts so that
they're script.cgi.suspended :)
On Fri, 10 Nov 2000 20:10:02 GMT, "EM" <me@privacy.net> wrote:
>your using webprovider.com right?
>they are a pain in the ass
>here is a rather bold way of bypassing their restriction
>
>create a file with notepad call it ".htaccess" leave quotes to prevent
>notepad adding .txt
>enter this in that file
>#START OF FILE
>
>DirectoryIndex /index.cgi2
>AddHandler cgi-script .cgi2
>
>#END OF FILE
>
>now just rename extention to .cgi2
>works perfectly :)
>dont forget to chmod to 755 (webprovider overlooks this on .cgi but not on
>.cgi2)
>
>Eric
>
><xzhang3388@my-deja.com> wrote in message
>news:8ugb9t$g20$1@nnrp1.deja.com...
>> I have some perl cgi scripts which simply read some data files and then
>> display a html page. Those cgi scripts usually work OK, but sometimes
>> after an execution the web server (on UNIX) renames the executed script
>> with extension ".suspended".
>>
>> Once this happens, the system persistently does this (to the same
>> script) for hours -- even when I rename it back to original name
>> manually, the system will add the ".suspended" extension it again
>> within
>> seconds.
>>
>> What could be the cause and how to prevent this? Thanks in advance.
>>
>> Best regards
>>
>> Xiaogang
>>
>>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>
------------------------------
Date: Fri, 10 Nov 2000 23:11:49 GMT
From: mag@ionet.net (Maggert)
Subject: Re: my.cgi.suspended
Message-Id: <3a0c8063.290476643@news.ionet.net>
On Fri, 10 Nov 2000 08:23:27 GMT, xzhang3388@my-deja.com wrote:
>I have some perl cgi scripts which simply read some data files and then
>display a html page. Those cgi scripts usually work OK, but sometimes
>after an execution the web server (on UNIX) renames the executed script
>with extension ".suspended".
>
>Once this happens, the system persistently does this (to the same
>script) for hours -- even when I rename it back to original name
>manually, the system will add the ".suspended" extension it again
>within
>seconds.
>
>What could be the cause and how to prevent this? Thanks in advance.
>
>Best regards
>
>Xiaogang
>
Bad programming maybe? Obviously the .suspended is a warning
from the administrator, or did you think that was common practice?
MP
------------------------------
Date: Fri, 10 Nov 2000 23:24:39 +0100
From: Gerd Bavendiek <bav@esn.sbs.de>
Subject: pack result - can someone please explain ?
Message-Id: <7jshu8.bg8.ln@lulu.bav.de>
Hi,
this is my small program:
lulu:/home/bav/wsp/eurodial> cat t6
#!/usr/bin/perl
print pack("cc", 9, 10);
print pack("hh", 0x09, 0x0a);
Doing
lulu:/home/bav/wsp/eurodial> ./t6 > qqq
I get
lulu:/home/bav/wsp/eurodial> od -c qqq
0000000 \t \n \t 001
0000004
which really surprises me. Can please someone explain ?
Thanks
Gerd
------------------------------
Date: Fri, 10 Nov 2000 21:46:16 GMT
From: mshemer@my-deja.com
Subject: Re: Perl DBD::ODBC compilation problem on Tru64
Message-Id: <8uhqb6$msu$1@nnrp1.deja.com>
Thanks for your help Kurt. I'm still having some problems with
warnings, but I've at least advanced to the point it will compile and
pass 80% of the tests in the make test command.
I took what you said, and then looked at the Makefile.PL again. I found
out that there was a line in the Makefile.PL to include the iodbc.h file
which includes defining some things including FAR. This line though had
been commented out, so these definitions weren't happening. (I'm still
not sure if the creator of the Makefile.PL had commented out this line
intentionally or not.) At any rate, by uncommenting this line and doing
some minor commenting out of duplicate definitions (between isql.h
isqlext.h and sqltypes.h). I removed the duplicate definitions from
sqltypes.h. I can now compile and use the module. Unfortunately
though, it's still not fully operational. It has a nasty habit of
crashing if any sql query comes back with more than 80 characters per
line.
I'm going to keep working on it to get rid of the warnings, but I'll
include the make output with the warnings in this post in case anyone
has any further suggestions. Regardless, thanks for your help Kurt.
Output from make at end of post.
Mike
--
Michael Hemer
michael.hemer@cleardata.net
In article <8ucu6n$8sn$1@slb7.atl.mindspring.net>,
"Kurt Stephens" <kstep@pepsdesign.com> wrote:
> <mshemer@my-deja.com> wrote in message
news:8uckja$egt$1@nnrp1.deja.com...
> > Hi -
> >
> > I was hoping that someone would have a suggestion for the
compilation
> problem
> > I'm having with Perl's DBD::ODBC module. The OS of the machine I'm
on is
> > Tru64 OSF1 V5.0.
> >
> > First, I have successfully installed the OpenLink software
(Universal Data
> > Access Drivers Multi-Tier Editon and SDK). I have also tested it
using
> the
> > odbctest and can successfully run SQL statements against the remote
> server.
> >
> > Next, I have successfully installed the Perl DBI module.
> >
> > Finally though, when trying to install the Perl DBD::ODBC module I
get the
> > compilation errors saying that semicolons are missing from the
isql.h and
> > isqlext.h files. (I'm including the perl Makefile.PL output and
make
> output
> > at the end of this article)
> >
> > Please let me know if you have any idea why this is happening and
how to
> fix
> > it.
> >
> > Thanks,
> > Mike
> > Michael Hemer
> > michael.hemer@cleardata.net
> >
>
> You ain't missin' no semicolons, yer missin' yer whole dern memory
model
> declaration!
>
> Seriously, the compiler is choking on lines like
>
> > cc: Error: /usr/users/improv/openlink/odbcsdk/include/isql.h, line
13:
> > Missing ";". (nosemi)
> > typedef void FAR *HSTMT;
> > -----------------^
>
> and
>
> cc: Error: /usr/users/improv/openlink/odbcsdk/include/isqlext.h, line
> 1060: Missing ";". (nosemi)
> RETCODE SQL_API SQLGetData (HSTMT hstmt, UWORD icol, SWORD fCType,
> --------^
>
> I would suspect that somewhere in the include files (or the files that
they
> include) there are a few lines like:
>
> #ifdef WIN32
> #define FAR far
> #elsif ...
> #endif
>
> I am guessing that the include files do not contain provisions for
your OS
> and macros such as FAR and RETCODE are not being properly defined.
You may
> need to supply some additional values to MakeMaker in the 'perl
Makefile.PL'
> stage of your installation, particularly the INC and DEFINE
parameters.
>
> The example below is guaranteed to be TOTALLY WRONG, but you may wind
up
> with something that looks like:
>
> perl Makefile.PL INC='tru64.h' DEFINE='TRU64'
>
> Again, this is just a guess, but it my point you in the right
direction.
>
> Kurt Stephens
>
>
Output from make:
$ make
mkdir ./blib
mkdir ./blib/lib
mkdir ./blib/lib/DBD
mkdir ./blib/arch
mkdir ./blib/arch/auto
mkdir ./blib/arch/auto/DBD
mkdir ./blib/arch/auto/DBD/ODBC
mkdir ./blib/lib/auto
mkdir ./blib/lib/auto/DBD
mkdir ./blib/lib/auto/DBD/ODBC
mkdir ./blib/man3
cp ODBC.pm ./blib/lib/DBD/ODBC.pm
/bin/perl -p -e "s/~DRIVER~/ODBC/g" <
/usr/lib/perl-5.004/lib/site_perl/alpha-de
c_osf/auto/DBI/Driver.xst > ODBC.xsi
/bin/perl -I/usr/lib/perl-5.004/lib/alpha-dec_osf/5.00404
-I/usr/lib/perl-5.004/
lib /usr/lib/perl-5.004/lib/ExtUtils/xsubpp -typemap
/usr/lib/perl-5.004/lib/Ex
tUtils/typemap ODBC.xs >ODBC.tc && mv ODBC.tc ODBC.c
cc -c -I. -I/usr/lib/perl-5.004/lib/site_perl/alpha-dec_osf/auto/DBI
-fprm d -ie
ee -std -D__LANGUAGE_C__ -O4 -DVERSION=\"0.28\"
-DXS_VERSION=\"0.28\" -I/u
sr/lib/perl-5.004/lib/alpha-dec_osf/5.00404/CORE
-I/usr/users/improv/openlink/od
bcsdk/include ODBC.c
cc: Warning: /usr/users/improv/openlink/odbcsdk/include/sql.h, line 91:
The rede
finition of the macro "SQL_TYPE_MIN" conflicts with a current definition
because
the replacement lists differ. The redefinition is now in effect.
(macroredef)
#define SQL_TYPE_MIN SQL_CHAR
----------------------------------------^
cc: Warning: ODBC.xs, line 196: In this statement, the referenced type
of the po
inter value "dsn" is "unsigned char", which is not compatible with
"char". (ptrm
ismatch)
strcpy(dsn, "DBI:ODBC:");
---------------^
cc: Warning: ODBC.xs, line 215: In this statement, the referenced type
of the po
inter value "dsn" is "unsigned char", which is not compatible with
"char". (ptrm
ismatch)
ST(numDataSources++) = newSVpv(dsn, dsn_length+9 /*
strlen("dbi:ODBC
:") */ );
-------------------------------------------^
cc -c -I. -I/usr/lib/perl-5.004/lib/site_perl/alpha-dec_osf/auto/DBI
-fprm d -ie
ee -std -D__LANGUAGE_C__ -O4 -DVERSION=\"0.28\"
-DXS_VERSION=\"0.28\" -I/u
sr/lib/perl-5.004/lib/alpha-dec_osf/5.00404/CORE
-I/usr/users/improv/openlink/od
bcsdk/include dbdimp.c
cc: Warning: /usr/users/improv/openlink/odbcsdk/include/sql.h, line 91:
The rede
finition of the macro "SQL_TYPE_MIN" conflicts with a current definition
because
the replacement lists differ. The redefinition is now in effect.
(macroredef)
#define SQL_TYPE_MIN SQL_CHAR
----------------------------------------^
cc: Warning: dbdimp.c, line 165: In this statement, the referenced type
of the p
ointer value "dbname" is "char", which is not compatible with "unsigned
char". (
ptrmismatch)
dbname,
--------------------------^
cc: Warning: dbdimp.c, line 167: In this statement, the referenced type
of the p
ointer value "szConnStrOut" is "char", which is not compatible with
"unsigned ch
ar". (ptrmismatch)
szConnStrOut,
--------------------------^
cc: Warning: dbdimp.c, line 207: In this statement, the referenced type
of the p
ointer value "dbname" is "char", which is not compatible with "unsigned
char". (
ptrmismatch)
dbname, strlen(dbname),
------------------------^
cc: Warning: dbdimp.c, line 208: In this statement, the referenced type
of the p
ointer value "Perl_uid" is "char", which is not compatible with
"unsigned char".
(ptrmismatch)
uid, strlen(uid),
------------------------^
cc: Warning: dbdimp.c, line 209: In this statement, the referenced type
of the p
ointer value "pwd" is "char", which is not compatible with "unsigned
char". (ptr
mismatch)
pwd, strlen(pwd));
------------------------^
cc: Warning: dbdimp.c, line 317: In the definition of the function
"odbc_error",
the promoted type of err_rc is incompatible with the type of the
corresponding
parameter in a prior declaration. (promotmatchw)
RETCODE err_rc;
--------^
cc: Warning: dbdimp.c, line 370: In this statement, the referenced type
of the p
ointer value "sqlstate" is "unsigned char", which is not compatible with
"const
char". (ptrmismatch)
sv_setpvn(DBIc_STATE(imp_xxh), sqlstate, 5);
-------------------------------------------^
cc: Warning: dbdimp.c, line 375: In this statement, the referenced type
of the p
ointer value "sqlstate" is "unsigned char", which is not compatible with
"const
char". (ptrmismatch)
sv_setpv(DBIc_ERR(imp_xxh), sqlstate);
--------------------------------------------^
cc: Warning: dbdimp.c, line 377: In this statement, the referenced type
of the p
ointer value "ErrorMsg" is "unsigned char", which is not compatible with
"char".
(ptrmismatch)
sv_catpvn(errstr, ErrorMsg, ErrorMsgLen);
------------------------------^
cc: Warning: dbdimp.c, line 379: In this statement, the referenced type
of the p
ointer value "sqlstate" is "unsigned char", which is not compatible with
"char".
(ptrmismatch)
sv_catpv(errstr, sqlstate);
-----------------------------^
cc: Warning: dbdimp.c, line 385: In this statement, the referenced type
of the p
ointer value "sqlstate" is "unsigned char", which is not compatible with
"const
char". (ptrmismatch)
if (what && !strcmp(sqlstate, "25000") && !strcmp(what,
"db_disconne
ct/SQLDisconnect")) {
--------------------------------^
cc: Warning: dbdimp.c, line 567: In this statement, the referenced type
of the p
ointer value "table_type&&*table_type?table_type:0" is "char", which is
not comp
atible with "unsigned char". (ptrmismatch)
table_type && *table_type ? table_type : 0, SQL_NTS
/* type (view, table, etc) */
-------------------^
cc: Warning: dbdimp.c, line 613: In this statement, the referenced type
of the p
ointer value "imp_sth->statement" is "char", which is not compatible
with "unsig
ned char". (ptrmismatch)
imp_sth->statement, strlen(imp_sth->statement));
--------------------^
cc: Warning: dbdimp.c, line 952: In this statement, the referenced type
of the p
ointer value "(((phs->sv)->sv_flags&0X0000000000040000)?((len=((XPV
...)(phs->sv
)->sv_any)->xpv_cur),((XPV
...)(phs->sv)->sv_any)->xpv_pv):Perl_sv_2pv(...))" is
"char", which is not compatible with "unsigned char". (ptrmismatch)
ptr = SvPV(phs->sv, len);
--------^
cc: Warning: dbdimp.c, line 1427: In this statement, the referenced type
of the
pointer value "phs->sv_buf" is "char", which is not compatible with
"unsigned ch
ar". (ptrmismatch)
rgbValue = phs->sv_buf;
----------------^
cc: Warning: dbdimp.c, line 1850: In this statement, the referenced type
of the
pointer value "imp_sth->fbh[i].ColName" is "unsigned char", which is not
compati
ble with "char". (ptrmismatch)
av_store(av, i, newSVpv(imp_sth->fbh[i].ColName, 0));
----------------------------------------^
cc: Warning: dbdimp.c, line 1892: In this statement, the referenced type
of the
pointer value "cursor_name" is "char", which is not compatible with
"unsigned ch
ar". (ptrmismatch)
cursor_name, sizeof(cursor_name),
&cursor_name
_len);
----------------------------------^
cc: Warning: dbdimp.c, line 2018: In this statement, the referenced type
of the
pointer value "CatalogName" is "char", which is not compatible with
"unsigned ch
ar". (ptrmismatch)
CatalogName, strlen(CatalogName),
-----------------------^
cc: Warning: dbdimp.c, line 2019: In this statement, the referenced type
of the
pointer value "SchemaName" is "char", which is not compatible with
"unsigned cha
r". (ptrmismatch)
SchemaName, strlen(SchemaName),
-----------------------^
cc: Warning: dbdimp.c, line 2020: In this statement, the referenced type
of the
pointer value "TableName" is "char", which is not compatible with
"unsigned char
". (ptrmismatch)
TableName, strlen(TableName),
-----------------------^
cc: Warning: dbdimp.c, line 2053: In this statement, the referenced type
of the
pointer value "CatalogName" is "char", which is not compatible with
"unsigned ch
ar". (ptrmismatch)
CatalogName, strlen(CatalogName),
------------------------^
cc: Warning: dbdimp.c, line 2054: In this statement, the referenced type
of the
pointer value "SchemaName" is "char", which is not compatible with
"unsigned cha
r". (ptrmismatch)
SchemaName, strlen(SchemaName),
------------------------^
cc: Warning: dbdimp.c, line 2055: In this statement, the referenced type
of the
pointer value "TableName" is "char", which is not compatible with
"unsigned char
". (ptrmismatch)
TableName, strlen(TableName));
------------------------^
cc: Warning: dbdimp.c, line 2090: In this statement, the referenced type
of the
pointer value "CatalogName" is "char", which is not compatible with
"unsigned ch
ar". (ptrmismatch)
Identifier,
CatalogName, strl
en(CatalogName),
---------------------------------------------------------------^
cc: Warning: dbdimp.c, line 2091: In this statement, the referenced type
of the
pointer value "SchemaName" is "char", which is not compatible with
"unsigned cha
r". (ptrmismatch)
SchemaName,
strlen(SchemaName
),
---------------------------------------------------^
cc: Warning: dbdimp.c, line 2092: In this statement, the referenced type
of the
pointer value "TableName" is "char", which is not compatible with
"unsigned char
". (ptrmismatch)
TableName,
strlen(TableName),
---------------------------------------------------^
cc: Warning: dbdimp.c, line 2128: In this statement, the referenced type
of the
pointer value "PK_CatalogName" is "char", which is not compatible with
"unsigned
char". (ptrmismatch)
PK_CatalogName, strlen(PK_CatalogName),
------------------------^
cc: Warning: dbdimp.c, line 2129: In this statement, the referenced type
of the
pointer value "PK_SchemaName" is "char", which is not compatible with
"unsigned
char". (ptrmismatch)
PK_SchemaName, strlen(PK_SchemaName),
------------------------^
cc: Warning: dbdimp.c, line 2130: In this statement, the referenced type
of the
pointer value "PK_TableName" is "char", which is not compatible with
"unsigned c
har". (ptrmismatch)
PK_TableName, strlen(PK_TableName),
------------------------^
cc: Warning: dbdimp.c, line 2131: In this statement, the referenced type
of the
pointer value "FK_CatalogName" is "char", which is not compatible with
"unsigned
char". (ptrmismatch)
FK_CatalogName, strlen(FK_CatalogName),
------------------------^
cc: Warning: dbdimp.c, line 2132: In this statement, the referenced type
of the
pointer value "FK_SchemaName" is "char", which is not compatible with
"unsigned
char". (ptrmismatch)
FK_SchemaName, strlen(FK_SchemaName),
------------------------^
cc: Warning: dbdimp.c, line 2133: In this statement, the referenced type
of the
pointer value "FK_TableName" is "char", which is not compatible with
"unsigned c
har". (ptrmismatch)
FK_TableName, strlen(FK_TableName));
------------------------^
cc: Warning: dbdimp.c, line 2147: In the definition of the function
"odbc_descri
be_col", the promoted type of BufferLength is incompatible with the type
of the
corresponding parameter in a prior declaration. (promotmatchw)
I16 BufferLength;
----^
cc: Warning: dbdimp.c, line 2157: In this statement, the referenced type
of the
pointer value "ColumnName" is "char", which is not compatible with
"unsigned cha
r". (ptrmismatch)
ColumnName, BufferLength, NameLength,
------------------------^
cc: Warning: dbdimp.c, line 2158: In this statement, the referenced type
of the
pointer value "ColumnSize" is "unsigned int", which is not compatible
with "unsi
gned long". (ptrmismatch)
DataType, ColumnSize, DecimalDigits, Nullable);
----------------------------------^
cc: Warning: dbdimp.c, line 2347: In this statement, the referenced type
of the
pointer value "(catalog&&*catalog)?catalog:0" is "char", which is not
compatible
with "unsigned char". (ptrmismatch)
(catalog && *catalog) ? catalog : 0, SQL_NTS,
--------------------^
cc: Warning: dbdimp.c, line 2348: In this statement, the referenced type
of the
pointer value "(schema&&*schema)?schema:0" is "char", which is not
compatible wi
th "unsigned char". (ptrmismatch)
(schema && *schema) ? schema : 0, SQL_NTS,
--------------------^
cc: Warning: dbdimp.c, line 2349: In this statement, the referenced type
of the
pointer value "(table&&*table)?table:0" is "char", which is not
compatible with
"unsigned char". (ptrmismatch)
(table && *table) ? table : 0, SQL_NTS,
--------------------^
cc: Warning: dbdimp.c, line 2350: In this statement, the referenced type
of the
pointer value "(column&&*column)?column:0" is "char", which is not
compatible wi
th "unsigned char". (ptrmismatch)
(column && *column) ? column : 0, SQL_NTS);
--------------------^
Running Mkbootstrap for DBD::ODBC ()
chmod 644 ODBC.bs
ar cr tmp.a ODBC.o dbdimp.o
: tmp.a
LD_RUN_PATH="/usr/users/improv/openlink/odbcsdk/lib" ld -o
./blib/arch/auto/DBD/
ODBC/ODBC.so -shared -expect_unresolved "*" -O4 -msym -s -all tmp.a
-none -L
/usr/users/improv/openlink/odbcsdk/lib -liodbc
chmod 755 ./blib/arch/auto/DBD/ODBC/ODBC.so
cp ODBC.bs ./blib/arch/auto/DBD/ODBC/ODBC.bs
chmod 644 ./blib/arch/auto/DBD/ODBC/ODBC.bs
Manifying ./blib/man3/DBD::ODBC.3
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 10 Nov 2000 13:22:00 -0800
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: perl5porters: defined @array depricated? -- PROBLEMS!
Message-Id: <3A0C66F8.9349816C@ipac.caltech.edu>
"Jari Aalto+mail.perl" wrote:
>
> The latest perl documentation says that to test for array
> existence, you should NOT use `defined' and it recommends the `if' test.
>
> However, I can see a problem here. If module declares variables that
> you could use, how do you know if they exist or not, if you have
> to rely on the `if'. Here the `@array' is definitely declared and only
> detected by the DEFINED.
>
> Module A. Declares an array
> Module B. Wants to see if that array exists - maybe the name has
> been renamed in later versions of the module...
> --> defined works but is depricated.
> `if' is recommended but doesn't work ???
% perl -le 'package A; %x=(); package main; print
defined(*A::x{ARRAY})?"yup":"nope";'
nope
% perl -le 'package A; $x=0 ; package main; print
defined(*A::x{ARRAY})?"yup":"nope";'
nope
% perl -le 'package A; @x=(); package main; print
defined(*A::x{ARRAY})?"yup":"nope";'
yup
Not pretty, but it works, and is better than the deprecated "defined @A::x"
because the mere existence of @A::x in the defined statement instantiates @A::x.
Thus:
% perl -le 'print defined(*A::x{ARRAY})?"yup":"nope";'
nope
% perl -le 'print defined(*A::x{ARRAY})?"yup":"nope"; print "defined" if defined
@A::x'
yup
(I hope that all came out right; I did a little post cut&paste editing for
brevity.)
--
-- Tim Conrow tim@ipac.caltech.edu |
------------------------------
Date: Fri, 10 Nov 2000 16:21:29 +0800
From: "Jeff Yoak" <jeff@yoak.com>
Subject: Re: Pushing a hash on to a stack...
Message-Id: <8uhots0mqu@news2.newsguy.com>
In article <8FE79953FCraznar@24.192.1.17>, "Christopher Burke"
<craznar@hotmail.com> wrote:
> Thats right - I will not bother this newsgroup anymore, after all there
> is no help for people new to Perl on experts are welcome here.
Oh, you're just being stupid now. We'll be better without you.
Cheers,
Jeff
------------------------------
Date: Fri, 10 Nov 2000 22:54:34 GMT
From: Quantum Mechanic <quantum_mechanic@my-deja.com>
Subject: Random Array with Sort?
Message-Id: <8uhub7$q98$1@nnrp1.deja.com>
Someone asked me the "random array" question again. I of course pointed
them to perlfaq4, etc.
However, I started thinking about the Fisher/Yates Shuffle, and wondered
if its running time could be improved but still be unbiased (each
permutation is equally likely). Fisher/Yates is O(n^2), while quicksort
is O(n.log(n)).
On a whim I tried:
@array = sort { -rand( 2 ) } @array;
This seems to be about twice as fast as F/Y (and grows less quickly).
However, this is highly biased. Also, for arrays >= 7 elements, most
permutations never appear, regardless of how many trials are run
(probably due to efficiencies of sort ;).
Does anyone have any good ideas along these lines?
Has Fisher/Yates been proved optimal for unbiased results?
-QM
--
Quantum Mechanics: The dreams stuff is made of.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 10 Nov 2000 21:51:16 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Self-modifying code in Perl
Message-Id: <8uhqkk$5r3$1@lublin.zrz.tu-berlin.de>
<nobull@mail.com> wrote in comp.lang.perl.misc:
>Jeff Pinyan <jeffp@crusoe.net> writes:
>
>> >An alternative I like to bring up at this point:
>> >
>> > read CODE, $_, -s CODE;
>>
>> I got "credited" with that idiom, in a "Perl for System Administration".
>> I find that exceptionally cool. When we were having the "how to read a
>> file" thread here, several months ago, I came up with that one. :)
>
>Good though this idiom is under certain limited circumstances (as may
>apply here) I think it should always be acompanied by a prominant
>"health warning". You must be absolutely sure that the file handle
>will only ever be a regular file.
>
>It is all too easy to get into the habit of using something like this
>all the time because you think it's cool and then hit problems when
>someone does:
>
>$ myscript.pl <(some_command)
Why would that give "read STDIN, $x, -s STDIN" problems that
"{ local $/; $x = <STDIN> }" doesn't have? Both show the same behavior
in simple tests.
The explicit use of -s on an arbitrary filehandle may look suspect,
but many unixes define it reasonably for pipes (the number of bytes
available), so it should do the right thing there.
Anno
------------------------------
Date: 10 Nov 2000 17:13:41 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Self-modifying code in Perl
Message-Id: <m34s1f8oh6.fsf@mumonkan.sunstarsys.com>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> Why would that give "read STDIN, $x, -s STDIN" problems that
> "{ local $/; $x = <STDIN> }" doesn't have? Both show the same behavior
> in simple tests.
% cat /tmp/really_big_text_file | myscript.pl
unless STDIN's buffer size is bigger than the size of the file,
you're not going to get the whole file this way.
Even worse would be trying to use this technique for handling
HTTP/1.1 chunked data in a CGI script.
--
Joe Schaefer
------------------------------
Date: Fri, 10 Nov 2000 15:21:19 -0500 (EST)
From: blatnoi@webtv.net (=?ISO-8859-1?Q?BigB=90=90=99?=)
Subject: Shell Comands ??
Message-Id: <19849-3A0C58BF-34@storefull-617.iap.bryant.webtv.net>
Is there a short or good list of unix shell commands ??
thanks
------------------------------
Date: Fri, 10 Nov 2000 15:03:25 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Shell Comands ??
Message-Id: <slrn90ol4d.flc.tadmc@magna.metronet.com>
On Fri, 10 Nov 2000 15:21:19 -0500 (EST), BigB <blatnoi@webtv.net> wrote:
>Is there a short or good list of unix shell commands ??
Yes, but you won't find Unix commands in a Perl newsgroup.
Look in a Unix newsgroup for Unix commands.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 10 Nov 2000 16:27:56 -0500
From: SiKing <siking@yahoo.NOSPAM>
Subject: Re: Shell Comands ??
Message-Id: <3A0C685C.46687DA0@yahoo.NOSPAM>
BigB wrote:
> Is there a short or good list of unix shell commands ??
Sure ... numerous:
<http://www.nmt.edu/tcc/help/unix/unix_cmd.html>
<http://www.mcsr.olemiss.edu/unixhelp/DOStoUNIX.html>
<http://www.mcsr.olemiss.edu/unixhelp/commanz/index.html>
try a search engine ...
--
Candy for spammers:
http://www.goldinc.com/cgi-bin/harvest_this.cgi
------------------------------
Date: Fri, 10 Nov 2000 14:28:48 -0500
From: Henry Hartley <hartleh1@westat.com>
Subject: Re: Simple regex problem
Message-Id: <3A0C4C70.2DEC338E@westat.com>
"G.A.D.Miles" wrote:
>
> I want to check whether a variable contains more than 1,000
> characters. I hoped this would work:
>
So, you want to check the "length" of an expression?
--
Henry Hartley
Westat
Rockville, Maryland, USA
------------------------------
Date: Fri, 10 Nov 2000 20:39:33 GMT
From: Bob <theborg@usa.com>
Subject: using 2 arrays in a foreach loop
Message-Id: <3A0C5D00.D42B0CF8@usa.com>
--------------3229BC0391D032A971717EE9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I am having difficulty with a foreach loop. I would like to use two
arrrays. None of the texts I have
discuss how to use two arrays inside a foreach loop. The idea here is
only print those lines that are
not null for quantity. NOTE: I can get this to work for one array, ie if
I drop the @quantitys array.
foreach $product (@products) && $quantity (@quantitys) {
if ($quatity ne "" ) {
print "$quantity $product";
}}
PS Any help would be appreciated ! Thanks.
--------------3229BC0391D032A971717EE9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<pre>
I am having difficulty with a foreach loop. I would like to use two
arrrays. None of the texts I have
discuss how to use two arrays inside a foreach loop. The idea here is
only print those lines that are
not null for quantity. NOTE: I can get this to work for one array, ie if
I drop the @quantitys array.
foreach $product (@products) && $quantity (@quantitys) {
if ($quatity ne "" ) {
print "$quantity $product";
}}
PS Any help would be appreciated ! Thanks.</pre>
</html>
--------------3229BC0391D032A971717EE9--
------------------------------
Date: 10 Nov 2000 20:45:51 GMT
From: trammell@nitz.hep.umn.edu (John J. Trammell)
Subject: Re: using 2 arrays in a foreach loop
Message-Id: <slrn90nt77.dp2.trammell@nitz.hep.umn.edu>
On Fri, 10 Nov 2000 20:39:33 GMT, Bob <theborg@usa.com> wrote:
>I am having difficulty with a foreach loop. I would like to use two
>arrrays.
[snip]
Try this:
foreach my $i (0 .. $#products)
{
next unless $quantities[$i];
print $quantities[$i], " ", $products[$i];
}
--
John J. Trammell
johntrammell@yahoo.com
------------------------------
Date: Fri, 10 Nov 2000 14:21:13 -0800
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: using 2 arrays in a foreach loop
Message-Id: <3A0C74D9.5343B5CD@ipac.caltech.edu>
Bob wrote:
>
> ... I would like to use two arrrays. ... The idea here is
> only print those lines that are not null for quantity. ...
>
> foreach $product (@products) && $quantity (@quantitys) {
> if ($quatity ne "" ) {
You may want that test to be something more like
if(defined $quantity && $quantity ne "") { ...
> print "$quantity $product";
> }}
Well, the boring way to do this is
for(my $i=0; $i<=$#products; ++$i) {
print "$quantities[$i] $products[$i]\n" if $quantities[$i] ne "";
}
A more Perlish solution is to use hashes. To start out, I'll transform your data
structure (two arrays) into a hash:
my %prodinfo;
@prodinfo{@products} = @quantities;
Then cycle through them like this:
while(my ($product,$quantity) = each %prodinfo) {
print "$quantity $product\n" if $quantity ne "";
}
or
for my $product (sort keys %prodinfo) {
print "prodinfo{$product} $product\n" if $prodinfo{$product} ne "";
}
If you consider extensibility, you may find it's a good idea to keep your data
in a hash in the first place:
$product{cheerios} = {price=>25.02,quantity=>12,location=>"aisle B-12"};
See perlref.
--
-- Tim Conrow tim@ipac.caltech.edu |
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4866
**************************************