[12102] in Perl-Users-Digest
Perl-Users Digest, Issue: 5701 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 17 15:15:20 1999
Date: Mon, 17 May 99 12:00:22 -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 Mon, 17 May 1999 Volume: 8 Number: 5701
Today's topics:
*** What is wrong with this? *** <bie@connect.ab.ca>
A Perl Script <lone.wolf@net.ntl.com>
Re: Backreferences (Larry Rosler)
DBD::ODBC compilation problems - Help! <brian.findley@brightware.com>
Error message when reading a file tcpeter@my-dejanews.com
Re: Error message when reading a file <latsharj@my-dejanews.com>
Re: FAQ 4.14: How can I find the Julian Day? lvirden@cas.org
Re: file locking (Scott McMahan)
Re: file locking <tchrist@mox.perl.com>
getopts bing-du@tamu.edu
Re: Hash arrays <dgris@moiraine.dimensional.com>
Help matching any word not inside parentheses <grichard@uci.edu>
Re: Help translating data files <cassell@mail.cor.epa.gov>
Re: Help! sendmail problems <caslav@mail.muni.cz>
Re: Multi character quotes <cassell@mail.cor.epa.gov>
multiply dimesioned arrays, passed by reference <sherlock@genome.stanford.edu>
New website *sigh* only 755 permission <coach_2000@my-dejanews.com>
Re: Occasional user <giroux@dms.umontreal.ca>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 15 May 1999 00:48:36 -0600
From: Tim <bie@connect.ab.ca>
Subject: *** What is wrong with this? ***
Message-Id: <373D18C4.4A8E@connect.ab.ca>
Please tell me what the error is that I can not find
#!/usr/bin/perl5
require "subparseform.lib";
&Parse_Form;
print "Content-type:text/html\n\n";
$url = $formdata{'url'};
$name = $formdata{'name'};
$enter = $formdata{'enter'};
$msg = $formdata{'msg'};
$room = $formdata{'room'};
print <<"MYCODE"
<title>Auto Door Maker</title>
<body bgcolor=000000 text=FFFFFF>
Brought to you by:Tim's Doors<br>
<br><br>
Your Backdoor HTML:
<hr><br>
<FORM ACTION="$url" METHOD=POST>
Name: <INPUT NAME=USER VALUE="$name" SIZE=30>
<INPUT TYPE=HIDDEN NAME=SAYS VALUE="$enter">
Previous: <INPUT TYPE=text NAME=HISTORY VALUE="$msg" size=3>
Pics off: <input name=NOPIC type=checkbox value=1>
<INPUT TYPE=SUBMIT VALUE="$room"></form>
<br><hr>
</body>
MYCODE
------------------------------
Date: Mon, 17 May 1999 20:06:43 +0100
From: "Lone Wolf" <lone.wolf@net.ntl.com>
Subject: A Perl Script
Message-Id: <3740587d.0@145.227.194.253>
The books I have must be so full of rubbish :-
Can someone explain to me WHY this will not run on my Microsoft IIS 4
server?
print "HTTP/1.0 200 OK\n\n";
print "Content-Type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Hello World</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H4>Hello World</H4>\n";
print "<P>\n";
print "Your IP Address is $ENV{REMOTE_ADDR}.\n";
print "</P>\n";
print "<H5>Have a nice day</H5>\n";
print "</BODY>\n";
print "</HTML>\n";
I keep getting the error message :-
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
And thats all I get back.
Thanks for shedding any light.
------------------------------
Date: Mon, 17 May 1999 10:39:42 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Backreferences
Message-Id: <MPG.11a9f43742be77a5989a84@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7hpgil$2op@news.service.uci.edu> on Mon, 17 May 1999
09:41:22 -0700, Gabe <grichard@uci.edu> says...
> Is there some array associated with $1, $2, $3...etc?
No. But you can save all the captured values in an array of your own:
my @captures = $string =~ /(\w+)\s+(\d+)(\w+)/;
or
my @captures = $string =~ /(\w+)/g;
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 17 May 1999 13:49:20 -0400
From: Brian Findley <brian.findley@brightware.com>
Subject: DBD::ODBC compilation problems - Help!
Message-Id: <374056A0.3AC7A39F@brightware.com>
I'm trying to install all the 'right' packages so that I can connect to
a MS Sql Server database from my Unix box running HP-UX 10.20 (see the
perl -V output at the bottom). So far, I have the latest version of
Perl (5.005.03), the latest version of DBI (1.06), the latest version of
iODBC (2.50), and DBD::ODBC (0.20). Everything has installed correctly
except that I'm having trouble just getting the DBD::ODBC to compile.
This may be information overload - better to have more than enough, I
guess. Below is the output from *trying* to install the DBD::ODBC
package. What have I done wrong and how might I fix it?? Any
help/suggestions on this matter will be appreciated.
Thanks in advance,
Brian
Here are the gruesome details....
hslux02j:/cdd/tools/perl/.cpan/build/DBD-ODBC-0.20 -> perl Makefile.PL
Configuring DBD::ODBC ...
>>> Remember to actually *READ* the README file!
And re-read it if you have any problems.
Using DBI 1.06 installed in
/cdd/tools/perl/lib/site_perl/5.005/PA-RISC2.0/auto/DBI Using ODBC in
/cdd/tools/iodbc/lib glob failed (child exited with status 1) at
Makefile.PL
line 105.
Umm, this looks like a iodbc type of driver manager.
We expect to find the isql.h, isqlext.h and iodbc.h files (which were
supplied with iODBC) in $ODBCHOME directory alongside
the /cdd/tools/iodbc/lib/libiodbc.a /cdd/tools/iodbc/lib/libiodbc.sl
library.
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for
-l/cdd/tools/iodbc/lib/libiodbc.a
Using DBI 1.06 installed in
/cdd/tools/perl/lib/site_perl/5.005/PA-RISC2.0/auto/DBI
Writing Makefile for DBD::ODBC
The DBD::ODBC tests will use these values for the database connection:
DBI_DSN[i:ODBC:Explorer - Development e.g.
dbi:ODBC:demo
DBI_USER?0354
DBI_PASS?0354
hslux02j: /cdd/tools/perl/.cpan/build/DBD-ODBC-0.20 -> 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
/cdd/tools/perl/bin/perl -p -e "s/~DRIVER~/ODBC/g" <
/cdd/tools/perl/lib/site_perl/5.005/PA-RISC2.0/auto/DBI/Driver.xst >
ODBC.xsi
/cdd/tools/perl/bin/perl -I../../../lib -I../../../lib
../../../lib/ExtUtils/xsubpp -typemap ../../../lib/ExtUtils/typemap
ODBC.xs
>xstmp.c && mv xstmp.c ODBC.c
cc -c -I. -I/cdd/tools/perl/lib/site_perl/5.005/PA-RISC2.0/auto/DBI
-D_HPUX_SOURCE -Aa -O -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\" +z
-I../../.. -I/cdd/tools/iodbc/lib ODBC.c
cc: "ODBC.xs", line 95: warning 526: Pointer implicitly converted to
integral value in assignment.
cc: "ODBC.xs", line 95: warning 563: Argument #1 is not the correct
type.
cc -c -I.
-I/cdd/tools/perl/lib/site_perl/5.005/PA-RISC2.0/auto/DBI
-D_HPUX_SOURCE -Aa -O -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\" +z
-I../../.. -I/cdd/tools/iodbc/lib dbdimp.c
cc: "dbdimp.c", line 86: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 86: warning 563: Argument #1 is not the correct
type.
cc: "dbdimp.c", line 93: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 93: warning 563: Argument #1 is not the correct
type.
cc: "dbdimp.c", line 93: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 93: warning 563: Argument #2 is not the correct
type.
cc: "dbdimp.c", line 97: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 97: warning 563: Argument #1 is not the correct
type.
cc: "dbdimp.c", line 106: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 106: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 106: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 106: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 106: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 106: warning 563: Argument #4 is not the
correct
type.
cc: "dbdimp.c", line 106: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 106: warning 563: Argument #6 is not the
correct
type.
cc: "dbdimp.c", line 112: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 112: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 114: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 114: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 121: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 121: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 125: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 125: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 127: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 127: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 154: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 154: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 160: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 160: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 164: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 164: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 182: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 182: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 182: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 182: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 198: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 198: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 198: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 198: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 211: error 1711: Inconsistent parameter list
declaration for "dbd_error".
cc: "dbdimp.c", line 263: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 263: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 263: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 263: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 263: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 263: warning 563: Argument #3 is not the
correct
type.
cc: "dbdimp.c", line 268: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 268: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 273: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 273: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 275: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 275: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 277: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 277: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 444: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 444: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 444: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 444: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 455: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 455: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 455: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 455: warning 563: Argument #8 is not the
correct
type.
cc: "dbdimp.c", line 464: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 464: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 483: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 483: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 494: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 494: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 523: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 523: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 523: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 523: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 533: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 533: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 533: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 533: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 537: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 537: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 651: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 651: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 680: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 680: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 698: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 698: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 711: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 711: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 785: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 785: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 804: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 804: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 849: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 849: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 855: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 855: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 903: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 903: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 999: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 999: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1023: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1023: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1145: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1145: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1190: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1199: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1199: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1323: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1323: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1439: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1439: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1490: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1490: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1598: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1598: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1639: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1639: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1639: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1639: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 1707: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1707: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1736: error 1711: Inconsistent parameter list
declaration for "odbc_describe_col".
cc: "dbdimp.c", line 1750: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1750: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1750: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1750: warning 563: Argument #3 is not the
correct
type.
cc: "dbdimp.c", line 1778: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1778: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1778: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1778: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 1789: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1789: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1793: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1793: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1813: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1813: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1824: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1824: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1872: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1872: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1934: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1934: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1934: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1934: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 1952: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1952: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1952: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1952: warning 563: Argument #2 is not the
correct
type.
cc: "dbdimp.c", line 1952: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1952: warning 563: Argument #4 is not the
correct
type.
cc: "dbdimp.c", line 1952: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1952: warning 563: Argument #6 is not the
correct
type.
cc: "dbdimp.c", line 1952: warning 604: Pointers are not
assignment-compatible.
cc: "dbdimp.c", line 1952: warning 563: Argument #8 is not the
correct
type.
cc: "dbdimp.c", line 1961: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1961: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1980: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1980: warning 563: Argument #1 is not the
correct
type.
cc: "dbdimp.c", line 1991: warning 526: Pointer implicitly converted
to
integral value in assignment.
cc: "dbdimp.c", line 1991: warning 563: Argument #1 is not the
correct
type.
*** Error exit code 1
Stop.
hslux02j:/cdd/tools/perl/.cpan/build/DBD-ODBC-0.20 -> perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=hpux, osvers.20, archname=PA-RISC2.0
uname='hp-ux hslux02j b.10.20 c 9000889 248874341 32-user
license '
hint=recommended, useposix=true, d_sigaction^fine
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_HPUX_SOURCE -Aa'
ccflags ='-D_HPUX_SOURCE -Aa'
stdchar='unsigned char', d_stdstdio^fine, usevforkzlse
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=undef, longlongsize=, d_longdbl^fine, longdblsize
alignbytes=8, usemymalloc=y, prototype^fine
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt
libc=/lib/libc.sl, so=sl, useshrplibzlse, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,deferred '
cccdlflags='+z', lddlflags='-b -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under hpux
Compiled at May 5 1999 15:15:07
@INC:
/cdd/tools/perl/lib/5.00503/PA-RISC2.0
/cdd/tools/perl/lib/5.00503
/cdd/tools/perl/lib/site_perl/5.005/PA-RISC2.0
/cdd/tools/perl/lib/site_perl/5.005
.
hslux02j:/cdd/tools/perl/.cpan/build/DBD-ODBC-0.20 ->
------------------------------
Date: Mon, 17 May 1999 17:47:07 GMT
From: tcpeter@my-dejanews.com
Subject: Error message when reading a file
Message-Id: <7hpkmq$p9t$1@nnrp1.deja.com>
I'm still something of a newbie, so be gentle ;-).
I'm getting an error when trying to read through a list of individual
files in a directory. I know I could do this with a glob, but I get
even more undecipherable errors when I try that. I'm trying to find
specific text in multiple files in a directory. Ultimately, I want to
write the filenames containing the matching text into a file.
The error is "Couldn't open . : Permission denied."
Can't I pass variables to the filehandle? I've read perldoc, checked
the FAQ (in fact, I got part of the following code from it) and queried
Deja News, but now I'm stumped. Any help would be appreciated. Thanks.
My code appears below.
I'm running Perl version 5.005_03 on Windows NT.
#! /usr/bin/perl -w
print "What's the directory?\n";
chomp($path = <STDIN>);
print "What text are you looking for? \n";
chomp ($text = <STDIN>);
opendir(DIR, $path);
while ( defined ($file = readdir(DIR) ) ) {
push(@files,$file);
}
for $filename (@files) {
local *FH;
open(FH,"$filename") || die "Couldn't open $filename :
$!\n";
while (<FH>) {
print "$filename\n" if /$text/;
close(FH);
}
}
closedir(DIR);
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Mon, 17 May 1999 18:24:15 GMT
From: Dick Latshaw <latsharj@my-dejanews.com>
Subject: Re: Error message when reading a file
Message-Id: <7hpmsc$qn7$1@nnrp1.deja.com>
In article <7hpkmq$p9t$1@nnrp1.deja.com>,
tcpeter@my-dejanews.com wrote:
> The error is "Couldn't open . : Permission denied."
> #! /usr/bin/perl -w
>
> print "What's the directory?\n";
> chomp($path = <STDIN>);
> print "What text are you looking for? \n";
> chomp ($text = <STDIN>);
> opendir(DIR, $path);
> while ( defined ($file = readdir(DIR) ) ) {
> push(@files,$file);
> }
> for $filename (@files) {
> local *FH;
> open(FH,"$filename") || die "Couldn't open $filename :
> $!\n";
> while (<FH>) {
> print "$filename\n" if /$text/;
> close(FH);
> }
> }
> closedir(DIR);
Check the perlfunc entry for readdir. Particularly the comments
about the example.
--
Regards,
Dick
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 17 May 1999 18:45:24 GMT
From: lvirden@cas.org
Subject: Re: FAQ 4.14: How can I find the Julian Day?
Message-Id: <7hpo44$r28$1@srv38s4u.cas.org>
>From my old MVS programming days, programmers in this particular company
referred to dates of the format:
YYddd
where YY was the last two digits of the year and
ddd were the number of days in that date of a particular date. Jan 1, 1999
would be 99001, etc.
If there are various other types of 'Julian dates' then perhaps the
FAQ should list the ones known and what can be done to manipulate them.
Most people trying to address Y2K issues are going to be looking at
dates of varying formats, these being one of them...
--
<URL: mailto:lvirden@cas.org> Quote: Saving the world before bedtime.
<*> O- <URL: http://www.purl.org/NET/lvirden/>
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: 17 May 1999 17:27:05 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: file locking
Message-Id: <37405169.0@news.new-era.net>
Troy Knight (tk@toilets.freeserve.co.uk) wrote:
> How does file locking work, i've looked for ages done the posts but =
> can't find anything about it anywhere
UNIX file locking works on the participation basis: all processes
which want to use a file use the locking API first, and it tells
them if the file is locked or not. The drawback is this is
totally optional, at least in traditional UNIX.
More sophisticated locking exists on other systems. See info about
those systems for details. The actual kernel has locking built
into it.
Scott
------------------------------
Date: 17 May 1999 11:27:24 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: file locking
Message-Id: <3740517c@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Troy Knight" <tk@toilets.freeserve.co.uk> writes:
:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
:<HTML><HEAD>
:<META content=3D"text/html; charset=3Diso-8859-1" =
:http-equiv=3DContent-Type>
:<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
:<STYLE></STYLE>
:</HEAD>
:<BODY bgColor=3D#d8d0c8>
:<DIV><FONT face=3DArial size=3D2>How does file locking work, i've looked =
:for ages=20
:done the posts but can't find anything about it=20
:anywhere</FONT></DIV></BODY></HTML>
+-------------------------------------------------+
| +---------------------------------------------+ |
| | +-----------------------------------------+ | |
| | | +-------------------------------------+ | | |
| | | | +---------------------------------+ | | | |
| | | | | +-----------------------------+ | | | | |
| | | | | | +-------------------------+ | | | | | |
| | | | | | | +---------------------+ | | | | | | |
| | | | | | | | FIX YOUR NEWSREADER | | | | | | | |
| | | | | | | +---------------------+ | | | | | | |
| | | | | | +-------------------------+ | | | | | |
| | | | | +-----------------------------+ | | | | |
| | | | +---------------------------------+ | | | |
| | | +-------------------------------------+ | | |
| | +-----------------------------------------+ | |
| +---------------------------------------------+ |
+-------------------------------------------------+
Or else I'll start posting in troff and pdp-11 assembler.
Now, that I've said that, the answer is in the standard documentation
on your very system. If you don't have docs, you don't have perl.
What part of it didn't you understand? Look in perlfunc, perlfaq5, and
the new perlopentut. perlopentut is new, but the others should be there.
Go to
http://language.perl.com/newdocs/pod/perlopentut.html#File_Locking
if you don't have perlopentut.
--tom
--
[End of diatribe. We now return you to your regularly scheduled
programming...]
--Larry Wall in Configure from the perl distribution
------------------------------
Date: Mon, 17 May 1999 18:36:29 GMT
From: bing-du@tamu.edu
Subject: getopts
Message-Id: <7hpnjd$r7b$1@nnrp1.deja.com>
Can anybody tell me what the following getopts function does? Thank
you? ('i','s','u' are options). 'perldoc -f getopts' told me No
documentation for perl function `getopts' found
if (getopts('isu', \%opt) == 0) {
print $usage_msg;
exit 1;
}
Bing
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 17 May 1999 11:04:23 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Hash arrays
Message-Id: <m31zgfocfc.fsf@moiraine.dimensional.com>
armchair@my-dejanews.com writes:
> Are you truly contending that every Perl programmer should examine the
> source code of Perl to find out how $scalar = keys %hash; is
> implemented?
Well, now that you mention it, yes they should.
I'm not kidding, any person who hasn't spent time playing with
toke.c isn't qualified to call themselves a perl hacker. At best
they are similar to the people who cut and paste MS Word macros
without knowing why something works, at worst they are completely
incompetent individuals who give perl a reputation for non-reliability
and non-maintainability.
You don't have to have contributed vast amounts of code to the core,
but you should know how perl starts up, how the parser is entered, and
what an SV looks like at the very least.
dgris
- doesn't care what non-hackers think (s/w/t/ && $still_true)
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Mon, 17 May 1999 10:05:35 -0700
From: "Gabe" <grichard@uci.edu>
Subject: Help matching any word not inside parentheses
Message-Id: <7hpi03$3i0@news.service.uci.edu>
Still trying to get a functional understanding of regular expressions....
I think I've got the matching of words inside parentheses:
@parenwords = ($type =~ /\((\w+)\)/g);
How's that? Will that match and assign all words found within parentheses in
the string $type to @parenwords?
Now, how do I match all other words? Can I specify all words not within
parentheses somehow?
Gabe
------------------------------
Date: Mon, 17 May 1999 10:02:48 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help translating data files
Message-Id: <37404BB8.ACD4EBBA@mail.cor.epa.gov>
rootdog wrote:
>
> Given a data file created by a C program ( file utility reports it as
> 'data' ). Is it possible to parse the file and and output it in delimited
> text form without knowing the struct declarations which created the
> records?
Not in general. You'd need the PSI::ESP module. :-)
> What is the minimum information I need to translate the file?
> Is this even possible?
Only if you're lucky enough to have control over the input
also, or if the text strings and numbers in the output are
all in ASCII, instead of some proprietary format.
> We are trying to translate data files for a conversion and the original
> vendor who created the program is long gone
Oooh. That's Open Source is good and proprietary is bad.
> I have read through the camel book , perl func , several posts
> etc. (pack,unpack etc )but I have not been able to find an example where
> the strucure of the records was not known before hand.
Because that's the gory case. When I was faced with this sort
of catastrophe about 12 years ago, I was able to recover enough
data from the files we had been sent by slowly decomposing
them, step by step.
[1] Do the files have a header which maintains record information,
like a standard RDBMS file? If you can decode that in *one*
case, you can usually figure out how to parse the headers to get
the info out of the files. If you still have the program, you
can input some synthetic data, knowing what the output file
should look like, then treat it like a decryption exercise.
[2] Are the records fixed-length? If so, you can fiddle the
length of the file while you output the file, until everything
lines up. Bingo! The record length is yours.
[3] If you get this far, pull out the pieces you do know, and
then focus on deciphering the remnants. Use unpack() to
try a variety of formats and see if something works. I.e,
looks good on your test cases.
Once you get this far, then you've reduced the problem to the
examples you've already looked at. Sounds reeeeeal simple,
doesn't it? :-)
> Thank you for your help before hand.
You're welcome _a_posteriori_,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 14 May 1999 14:44:53 GMT
From: Martin Caslavsky <caslav@mail.muni.cz>
Subject: Re: Help! sendmail problems
Message-Id: <373C36E4.2F487469@mail.muni.cz>
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t")
> or die "Can't fork for sendmail: $!\n";
Hmm, why ar you using -oi option?
Anyway, I've tried (from console) and it worked.
Usually when I am sending email from cgi script I use only -t option and To:
field whith great results :)
> It didn't work, so I changed the first line to:
>
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t recipents_email\@otherhost")
> or die "Can't fork for sendmail: $!\n";
>
> This worked but the sender and subject fileds were blank in the email.
Maybe you are not allowed to change the From field, this is because of
sendmail configuration.
How looks like sources of those emails?
The best way probably would be to contact your system administrator and ask
him.
Martin Caslavsky
------------------------------
Date: Mon, 17 May 1999 11:04:50 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Multi character quotes
Message-Id: <37405A42.26F92AB2@mail.cor.epa.gov>
jon ewing wrote:
>
> Hi,
>
> Is it possible to use q, qq, qw etc with delimiters of more than one
> character? Or is there another way (ie not using q, qq, qw etc) to do
> this?
I think you're going to have to be a bit more specific here.
I can't tell what you want, or why you want it. [The 'why'
is sometimes more important, since that can tell us whether
you're asking for the wrong thing.]
Do you want to be able to change the input record separator
[not delimiter] for an incoming file?
[Answer here: change $/ ]
Do you want to change the output field separator and/or
output record separator as you print it?
[Answer here: change $, and/or $\ ]
Do you want to change the list separator?
The subscript separator?
....
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 17 May 1999 11:24:22 -0700
From: Gavin Sherlock <sherlock@genome.stanford.edu>
Subject: multiply dimesioned arrays, passed by reference
Message-Id: <170519991124222420%sherlock@genome.stanford.edu>
Hi,
I'm trying to use a 3-dimensional array, which has been passed into
a subroutine by reference. I am having huge troubles! If an array in
the third dimension has no members, it can't be pushed onto, so for the
first member, I have to use assignment. When I was doing this with two
dimensions, this seemed to work fine, but now with the extra dimension,
it's broken:
Original (2-D) case (worked):
use strict;
my @constrainedFamilies;
my $numFamilies=0;
&ParseDataFile(\@constrainedFamilies, \$numFamilies);
sub ParseDataFile{
$familyArrayRef=shift;
$numFamilies=shift;
my $UID;
my $UID2;
# lots of code to work out values for UID and UID2
# then...
@$familyArrayRef[$$numFamilies]=[$UID]; # have to assign first thing
# to array
push (@{@$familyArrayRef[$$numFamilies]}, $UID2); # now can push
# onto it
$$numFamilies++;
}
Obviously I left out a lot of the peripheral code, but above are all
the salient points. It does work (though if you see errors, I'd
appreciate knowing). The three dimesional case however doesn't work:
use strict;
my @constrainedFamilies;
my $numFamilies=0;
&ParseDataFile(\@constrainedFamilies, \$numFamilies);
sub ParseDataFile{
$familyArrayRef=shift;
$numFamilies=shift;
my $extraDimension;
my $UID;
my $UID2;
# lots of code to work out values for UID and UID2
# then...
for ($extraDimension=0; $extraDimension<5; $extraDimension++){
@$familyArrayRef[$$numFamilies]->[$extraDimension]=[$UID];
push (@{@$familyArrayRef[$$numFamilies]->[$extraDimension},
$UID2);
$$numFamilies++;
}
}
whenever it gets to the initial assignment (it does compile, though
won't compile without the derefencing arrows), I get the following
error:
Can't use an undefined value as an ARRAY reference at blah.pl line xxx,
<FILE> chunk yyy.
Any help in sorting out where I'm going wrong would be greatly
appreciated,
Cheers,
Gavin Sherlock
------------------------------
Date: Mon, 17 May 1999 17:20:52 GMT
From: LifeWalk Coach <coach_2000@my-dejanews.com>
Subject: New website *sigh* only 755 permission
Message-Id: <7hpj5g$o1b$1@nnrp1.deja.com>
Ok I have a Journal page up and am having troubles.
http://chs-journal-1999.webjump.com
So I found a free server with cgi-bin usage only to find out that they
preset permission to 755 only. I wish to find a script for discussions
and chat that I can place on this site and am having troubles due to the
lack of 777 permission.
I have set up the journal page for direct e-mail to my account that I
can upload yet this will be very time consuming so I need a better way
to do this.
Let me know if there is a free server that offers 777 permissions OR if
there is a place I can access which will offer me a chat and discussion
page I can place on my site.
--
May you face the winds and walk the
good road to the day of quiet ...
http://members.tripod.com/ThunderHawk_/indianherbs.html
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Mon, 17 May 1999 14:12:32 -0400
From: Andre Giroux <giroux@dms.umontreal.ca>
Subject: Re: Occasional user
Message-Id: <37405C10.A50E3F5@dms.umontreal.ca>
Bart Lateur a icrit :
> Andre Giroux wrote:
>
> >I am trying to convert a eps file into a pdf file using a perl script
> >(file created by Mathematica and to be included in a pdf document).
>
> I guess that's the EPS file, not the Perl script. The script probably
> serves to do some processing on the file?
>
> >Working on wintel, I downloaded perl and put my script in
> >c:\perl\bin .
>
> Bad place. Only stuff belonging to Perl itself should go there.
>
> >The question is : what should I do next ? (Or is it : what should I have
> >done before ? )
> >A lost mathematician.
>
> I guess you need to invoke the script with a command line like:
>
> perl script.pl thatfile.eps
>
> where script.pl is the path to the script, and thatfile.eps is the path
> to the epsfile.
>
> My guess is that it's best to put the script next to the eps file, go to
> the DOS prompt, chdir to that directory, and run the script with the
> bare file names (no path). See what happens next.
>
> Hope this helps,
> Bart.
Hi Bart.
Thanks for your tip.
Unfortunately, this is exactly what I had tried (same dir and all) and the
output was the error message:
Wrong command or filename ( in french Commande ou nom de fichier incorrect).
Any other idea ?
The script is at http://www.tug.org/applications/pdftex/epstopdf .
--
Andre Giroux
http://euler.dms.umontreal.ca/~giroux/
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5701
**************************************