[15638] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3051 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 15 14:05:41 2000

Date: Mon, 15 May 2000 11:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <958413914-v9-i3051@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 15 May 2000     Volume: 9 Number: 3051

Today's topics:
    Re: [Hash] Is the key always double-quoted? <lr@hpl.hp.com>
        ado record count of -1 (revisited) jeffhenke@my-deja.com
        ado record count of -1 (revisited) jeffhenke@my-deja.com
        ado record count of -1 (revisited) jeffhenke@my-deja.com
        alphabeticalize a perl array <awd@seol.net.au>
    Re: alphabeticalize a perl array <aqumsieh@hyperchip.com>
    Re: alphabeticalize a perl array (Bill)
        Color with Windows NT <aureld@free.fr>
        comparing files <plarkin@indeliblelink.com>
    Re: comparing files <jeff@vpservices.com>
    Re: DBD::ODBC error <jeff@vpservices.com>
    Re: Embedding plain text in HTML <lr@hpl.hp.com>
        File Upload and Multiple selection drop downs??? <dk932@hotmail.com>
    Re: Help with dates in Perl <lr@hpl.hp.com>
    Re: How to COPY a website (Dejan Topalovic)
    Re: How to replace "\" , HELP! <jeff@vpservices.com>
    Re: How to simulate a post request ? (brian d foy)
    Re: Looking to purchase an FTP script ... c_neak@my-deja.com
    Re: Looking to purchase an FTP script ... <hurleys@clark.cc.oh.us>
        Math::TrulyRandom and Perl5.6.0? <joshnarins@my-deja.com>
        perl 5.6 build error prabhakar@chaganti.net
        Perl and Apache Authentication <rberdeen@lane.k12.or.us>
    Re: Perl and Apache Authentication (brian d foy)
        Perl on AS/400.... (Marc Logemann)
        Perl vs ActivePerl <saddek@arch.chalmers.se>
    Re: Please Help friend on perl problem nobull@mail.com
        Producing arrays from quoted csv files from excel leonarm@my-deja.com
    Re: Producing arrays from quoted csv files from excel <jeff@vpservices.com>
        Random Lists <mouimet@direct.ca>
    Re: Starting another prog <lr@hpl.hp.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 15 May 2000 10:33:43 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: [Hash] Is the key always double-quoted?
Message-Id: <MPG.1389d4d23bf8e33598aa7f@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <m1snvjq5ar.fsf@halfdome.holdit.com> on 15 May 2000 07:03:24 
-0700, Randal L. Schwartz <merlyn@stonehenge.com> says...

 ...

>         %foo = (last => "Flintstone", first => "Fred");
> 
> The downside of using these "automatically quoted" contexts is that
> you'll get warnings for both if you enable -w, because the word "last"
> is also a function call.

No warnings since version 5.005.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 15 May 2000 16:17:45 GMT
From: jeffhenke@my-deja.com
Subject: ado record count of -1 (revisited)
Message-Id: <8fp7ul$g8h$1@nnrp1.deja.com>

I'm new to Perl - but have read the discussion on
this topic, but have yet to satisfactorily
resolve this issue:

All I want is a simple record count of an Access
97 table.  I have been able to get this using
the "long way" - doing a connection, and
evaluating a SQL count statment (thanks to a
posting in this NG!)

$conn = Win32::OLE->new("ADODB.Connection");
$conn->open("MYDSN");
$sql = "select count(*) from table";
$rs = $conn->execute($sql);
$count =  $rs->Fields(0)->Value."\n";
$rs->Close;
$conn->Close;

However, after looking at other suggestions and
looking at MS ADO help, I think I should be able
to do this more directly:

Something like:

$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open("MYSN");
$RS = CreateObject OLE "ADODB.Recordset";

The problem that when I try to "set" the
recordset object (following MS ADO documentation)

$RS->Open("select * from tblBooks",
$Conn, "adOpenKeySet", , "adCmdTable");

(with an eye toward $RS->RecordCount), it always
comes back with the message:  no such file or
directory.

I know there is some "fiddling" with cursor type
and lock type, but I don't think that's the
problem...but I'm not sure.  If anybody has a
working example of opening a recordset in this
fasion and using recordcount I'd be really
greateful.  Like I said, I can get what I want
using execute, but it bugs me that I can't figure
out how to implement a more direct approach!

thanks to all those who have already posted
before me!

Jeff Henke





Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 May 2000 16:17:44 GMT
From: jeffhenke@my-deja.com
Subject: ado record count of -1 (revisited)
Message-Id: <8fp7uk$g8e$1@nnrp1.deja.com>

I'm new to Perl - but have read the discussion on
this topic, but have yet to satisfactorily
resolve this issue:

All I want is a simple record count of an Access
97 table.  I have been able to get this using
the "long way" - doing a connection, and
evaluating a SQL count statment (thanks to a
posting in this NG!)

$conn = Win32::OLE->new("ADODB.Connection");
$conn->open("MYDSN");
$sql = "select count(*) from table";
$rs = $conn->execute($sql);
$count =  $rs->Fields(0)->Value."\n";
$rs->Close;
$conn->Close;

However, after looking at other suggestions and
looking at MS ADO help, I think I should be able
to do this more directly:

Something like:

$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open("MYSN");
$RS = CreateObject OLE "ADODB.Recordset";

The problem that when I try to "set" the
recordset object (following MS ADO documentation)

$RS->Open("select * from tblBooks",
$Conn, "adOpenKeySet", , "adCmdTable");

(with an eye toward $RS->RecordCount), it always
comes back with the message:  no such file or
directory.

I know there is some "fiddling" with cursor type
and lock type, but I don't think that's the
problem...but I'm not sure.  If anybody has a
working example of opening a recordset in this
fasion and using recordcount I'd be really
greateful.  Like I said, I can get what I want
using execute, but it bugs me that I can't figure
out how to implement a more direct approach!

thanks to all those who have already posted
before me!

Jeff Henke





Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 May 2000 16:19:00 GMT
From: jeffhenke@my-deja.com
Subject: ado record count of -1 (revisited)
Message-Id: <8fp80v$g9d$1@nnrp1.deja.com>

I'm new to Perl - but have read the discussion on this topic, but have
yet to satisfactorily resolve this issue:

All I want is a simple record count of an Access 97 table.  I have been
able to get this using the "long way" - doing a connection, and
evaluating a SQL count statment (thanks to a posting in this NG!)

$conn = Win32::OLE->new("ADODB.Connection");
$conn->open("MYDSN");
$sql = "select count(*) from table";
$rs = $conn->execute($sql);
$count =  $rs->Fields(0)->Value."\n";
$rs->Close;
$conn->Close;

However, after looking at other suggestions and looking at MS ADO help,
I think I should be able to do this more directly:

Something like:

$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open("MYSN");
$RS = CreateObject OLE "ADODB.Recordset";

The problem that when I try to "set" the recordset object (following MS
ADO documentation)

$RS->Open("select * from tblBooks",
$Conn, "adOpenKeySet", , "adCmdTable");

(with an eye toward $RS->RecordCount), it always comes back with the
message:  no such file or directory.

I know there is some "fiddling" with cursor type and lock type, but I
don't think that's the problem...but I'm not sure.  If anybody has a
working example of opening a recordset in this fasion and using
recordcount I'd be really greateful.  Like I said, I can get what I
want using execute, but it bugs me that I can't figure out how to
implement a more direct approach!

thanks to all those who have already posted before me!

Jeff Henke





Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 May 2000 17:36:07 GMT
From: Andrew <awd@seol.net.au>
Subject: alphabeticalize a perl array
Message-Id: <si0dc7dmrj045@corp.supernews.com>

hi I need to make an array (over 100 entries) in alphabetical order.
Would anyone have an idea on how to do this.
it's perl 5.
TIA
cya
Andrew

--
Posted via CNET Help.com
http://www.help.com/


------------------------------

Date: Mon, 15 May 2000 17:58:19 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: alphabeticalize a perl array
Message-Id: <7ad7mnlphw.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>


Andrew <awd@seol.net.au> writes:

> hi I need to make an array (over 100 entries) in alphabetical order.
> Would anyone have an idea on how to do this.

	perldoc -f sort
	perldoc -q sort

--Ala


------------------------------

Date: Mon, 15 May 2000 17:59:09 GMT
From: wfeidt@cpcug.org (Bill)
Subject: Re: alphabeticalize a perl array
Message-Id: <8F35860F7wfeidthiscom@207.126.101.97>

awd@seol.net.au (Andrew) wrote in <si0dc7dmrj045@corp.supernews.com>:

>hi I need to make an array (over 100 entries) in alphabetical order.
>Would anyone have an idea on how to do this.
>it's perl 5.

perldoc -f sort
perldoc perlfaq4  (see under: "How do I sort an array by (anything)?")

Also very useful is:

  http://www.sysarch.com/perl/sort_paper.html

Bill Feidt
wfeidt@cpcug.org
  


------------------------------

Date: Mon, 15 May 2000 16:32:49 GMT
From: "Aurelien" <aureld@free.fr>
Subject: Color with Windows NT
Message-Id: <REVT4.166$3s2.570520@nnrp3.proxad.net>

Hello !

I have problem to use color with Windows NT. I know how to use color.
Someone tell me that I just have to add the
"DEVICE=c:/Winnt/system32/ansi.sys" command in the
c:/Winnt/system32/config.nt file but it doesn't work.What is the correct
file or the correct command ? Thanks to answer me.

Aurelien




------------------------------

Date: Mon, 15 May 2000 15:21:23 GMT
From: "Patrick J. Larkin" <plarkin@indeliblelink.com>
Subject: comparing files
Message-Id: <B5458E2F.5D8E%plarkin@indeliblelink.com>

Hello:

I need a basic way to compare two text files.  Every night, I receive a
comma-delimited file with 14,000 database records each consisting of 25
fields.  On any given day, 10 records may change in some way.  Some may get
removed, some added or some changed.  I need a way to take yesterdays file,
compare it to todays file and then tell me what changed.  Preferably, I'd
like another comma delimited file so I can update a MySQL database with it.
Right now I delete the table and create a new one.  Where can I start?

P.



------------------------------

Date: Mon, 15 May 2000 10:07:24 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: comparing files
Message-Id: <39202ECC.BAB9154E@vpservices.com>

"Patrick J. Larkin" wrote:
> 
> I need a basic way to compare two text files.  Every night, I receive a
> comma-delimited file with 14,000 database records each consisting of 25
> fields.  On any given day, 10 records may change in some way.  Some may get
> removed, some added or some changed.  I need a way to take yesterdays file,
> compare it to todays file and then tell me what changed.  Preferably, I'd
> like another comma delimited file so I can update a MySQL database with it.
> Right now I delete the table and create a new one.  Where can I start?

The standard UNIX diff command is probably what you need.  It is
available for other platforms (e.g. windoze via cgywin) and, I believe
there is a Perl Power Tools version of it available at: 

   http://www.perl.com/pub/language/ppt/src/diff/

Alternatively, you could use DBD::CSV or DBD::RAM to cycle through the
two files, compare the rows, and do your MySQL inserts all at once.  My
guess is that the diff method would be faster.

-- 
Jeff


------------------------------

Date: Mon, 15 May 2000 08:58:39 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: DBD::ODBC error
Message-Id: <39201EAF.DE85AE54@vpservices.com>

Markus Enders wrote:
> 
> Hi Chris,
> 
> Chris Williams wrote:
> 
> > my $dbh = DBI->connect("dbi:ODBC:driver=Microsoft Access Driver
> > (*.mdb);dbq=\\\\A\\Test.mdb");
> 
> ODBC is an interface which gives you access to different data sources.
> Which data sources can be accessed if defined in the ODBC-panel on your
> computer (at least on NT, - probably it's the same on Win2K).
> You give a name to each data source. The name of the data source is,
> what you must specify here. Not the use of the Access Driver. This is
> done in the ODBC panel.

Sorry, Markus, but you're only half right here.  Giving a named DSN in
the ODBC panel is *one* way to connect via DBD::ODBC, but it is also
quite possible to use what is called a DSN-less connection in which all
information is specified in the DBI connect string and there is no
corresponding DSN name in the ODBC panel.  I have used such DSN-less
connections with excel and with the Jet text drivers.  I have read that
it is possible to do them with Access but haven't tried it myself. 
Basically the dang things are *very* picky and none quite like the
next.  Some seem to require backslashes rather than forward slashes,
some have curly braces around the driver name, etc.  The best source of
info on the DSN-less connections is written for ADO but works quite well
for DBD::ODBC --

	http://www.able-consulting.com/ADO_Conn.htm

Chris, I think you are missing curly braces, it should be:

  my $dsn = q[Driver={Microsoft Access Driver (*.mdb)};]
          . q[Dbq=a:\Test.mdb];
  my $dbh = DBI->connect("dbi:ODBC:$dsn",$user,$passwd,$attrbs);

-- 
Jeff


------------------------------

Date: Mon, 15 May 2000 10:17:42 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Embedding plain text in HTML
Message-Id: <MPG.1389d113e09f9e298aa7e@nntp.hpl.hp.com>

In article <8fonio$t4b$1@nnrp1.deja.com> on Mon, 15 May 2000 11:38:01 
GMT, Andreas Kahari <andkaha@my-deja.com> says...
> In article <8foh62$mi4$1@nnrp1.deja.com>,
>   chris2037@my-deja.com wrote:

 ...

> > open(FH, ">/somefile.html");
> 
> What kind of error did you get?
> 
> Do you have write permissions on '/'?
> 
> Try
> open(FH, ">/path/to/the/right/dir/somefile.html");

Surely you mean this instead:

    my $file = '/path/to/the/right/dir/somefile.html';
    open FH, ">$file" or die "Couldn't open '$file'. $!\n";

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 15 May 2000 16:31:23 +0100
From: "Dan" <dk932@hotmail.com>
Subject: File Upload and Multiple selection drop downs???
Message-Id: <8fp58j$95$1@lure.pipex.net>

I am having trouble creating a script which is capable of uploading a file
and returning all the selected items from a multiple selection drop down
menu.
I can get either one or the other working but not both at the same time.


Does anybody know of a script which will achieve this??

Thanks

Dan




------------------------------

Date: Mon, 15 May 2000 10:09:21 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Help with dates in Perl
Message-Id: <MPG.1389cf18956a356098aa7c@nntp.hpl.hp.com>

[In the future, please post your response *after* what you are 
responding to, so readers can follow the thread of discourse.]

In article <8fosfm$eoe$1@panther.uwo.ca> on Mon, 15 May 2000 09:01:41 -
0400, Darryl Olthoff <olthoff@multiboard.com> says...
> 
> "CoDoGG" <Co_DoGG.NoSPaM@HoMe.CoM> wrote in message
> news:391D2CF0.F521D928@HoMe.CoM...
> > Can someone help me.
> >
> > I need to find the current date in perl in the format YYYY-MM-DD in
> > order to compare it to another date located in a file!!
> >
> > Does anyone have any suggestions
> 
> ($Year, $Month, $Day) = (localtime(time))[5,4,3];
> $Year += 1900;
> $Date = sprintf("%4.4d-%02d-%02d", $Year, $Month, $Day);

Two superfluities and one bug.

1.  The default argument for localtime() is time(), so why bother?

2.  You are asking sprintf() to format a four-digit integer into a field 
of at least four characters, padding on the left with leading zeros if 
necessary.  Just '%d' will do fine.

3.  You adjusted the year correctly, but forgot about the month.

perldoc -f localtime

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 15 May 2000 15:25:41 GMT
From: detop@fly.srk.fer.hr (Dejan Topalovic)
Subject: Re: How to COPY a website
Message-Id: <slrn8i05lm.shq.detop@fly.srk.fer.hr>

 Keith Smith <ksmith@firesnacks.com> je napisao:

|Are there any good scripts out there for retrieving all the files found at a
|website?  Essentially, I would like to point this tool at a URL and have it
|decend all the local links and retrieve all the content associated with
|static html links.

Try 'wget' on Unix or Linux OS if you have.
Syntax is:
wget -b -np -nc -r -l0 -L -o status.log http://domain.name/ &

Type 'man wget' in your shell.

-- 
+---------------------------+-------------------------------------+
|Dejan Topalovic AKA StRiPy | E-mail:   detop@fly.srk.fer.hr      |
+---------------------------| URL :  http://fly.srk.fer.hr/~detop |   
                            | ICQ UIN: 20142302                   |
                            +-------------------------------------+




------------------------------

Date: Mon, 15 May 2000 09:16:34 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: How to replace "\" , HELP!
Message-Id: <392022E2.8CBCABF6@vpservices.com>

"LinkWorm Software, Inc." wrote:
> 
> When you upload a file via a CGI script, it only uploads the file, not
> the path. 

Wrong, the path is sent along with the file.

> The path on their local machine has no impact or relevance on
> the remote web server.

True, unless one wants to capture the original filename separated from
the original path.

> Further, the file name won't contain a back
> slashes anyway, Windows won't allow it. 

Say what???????

>I fail to understand your
> dilemma...

I think I've already answered the OP's question in another posting on
this thread, but the dilemma is this:  if I upload c:\foo\bar.txt from
windoze to nix and I want to save the file with the same name in
/usr/uploads, how do I find out that the original file was named
"bar.txt".  The answer is:  either I do a regex splitting off everything
up to and including the last backslash, or I use File::Basename. 

-- 
Jeff


------------------------------

Date: Mon, 15 May 2000 11:06:56 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: How to simulate a post request ?
Message-Id: <brian-1505001106560001@rtp-cr45-dhcp-100.cisco.com>

In article <8fovp0$67r$1@nnrp1.deja.com>, A. Nonomous <gcf@my-deja.com> wrote:

>This is the code I use:

life is much simpler with LWP :)

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



------------------------------

Date: Mon, 15 May 2000 15:10:00 GMT
From: c_neak@my-deja.com
Subject: Re: Looking to purchase an FTP script ...
Message-Id: <8fp3vp$b3l$1@nnrp1.deja.com>

In article <391FF981.C55C1EAB@rchland.ibm.com>,
  "Paul R. Andersen" <andersen+@rchland.ibm.com> wrote:
> jhalbrook@my-deja.com wrote:
> >
> > I need a script that will let me specify the IP address,
> > userid, and password so I can FTP files from one server
> > to another.
> >
> > Preferably a script that will not require installing any
> > Perl modules.
> >

Why don't you use a korne (or Bourne) shell script which calls an
EXPECT script ?
You must have an Unix machine , of course + the Expect module .
You can take a look on "comp.unix.shell" for that and you can search
"Expect" .


Good luck .


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 May 2000 12:43:40 -0400
From: Steve Hurley <hurleys@clark.cc.oh.us>
Subject: Re: Looking to purchase an FTP script ...
Message-Id: <t0a0is0cv3so6vo6eaf9jk3oicqf6h41jc@4ax.com>

If you can get away without having a perl script, there is a good
program called lftp. You can call a script file with the ftp commands
than you want to do.

for example:

# lftp -f testfile

:testfile

connect 198.168.0.1
user fred fredspassword
mirror -n /home/fred /usr/local/apache/htdocs/fred
quit


You can get this prog at www.freshmeat.net and do a search for lftp.




On Sat, 13 May 2000 19:35:34 GMT, jhalbrook@my-deja.com wrote:

>I need a script that will let me specify the IP address,
>userid, and password so I can FTP files from one server
>to another.
>
>Preferably a script that will not require installing any
>Perl modules.
>
>Please let me know if you can help me out.
>
>Much thanks.
>
>J. Halbrook
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.



------------------------------

Date: Mon, 15 May 2000 17:37:23 GMT
From: JoshNarins <joshnarins@my-deja.com>
Subject: Math::TrulyRandom and Perl5.6.0?
Message-Id: <8fpcki$lju$1@nnrp1.deja.com>

 make test hangs indefinitely for first call to
 Math::TrulyRandom::rand() in Cryptix-1.16/Math-TrulyRandom/test.pl

 The same error occurs with 1.00 (CPAN) and 1.03 (Cryptix.org) versions.


 Tail of strace perl ./test.pl :
 This would be the "1" printed right before "my $val1 =
 Math::TrulyRandom::rand();"

 write(1, "1\n", 21
 )                      = 2
 rt_sigaction(SIGALRM, {0x401bddb8, [], SA_RESTART|0x4000000},
{SIG_DFL}, 8) =
 0
 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 16665}},
 {it_interval={0, 0}, it_value={0, 0}}) = 0
 --- SIGALRM (Alarm clock) ---
 rt_sigaction(SIGALRM, {0x401bddb8, [], SA_RESTART|0x4000000},
{0x401bddb8,
 [], SA_RESTART|0x4000000}, 8) = 0
 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 16665}},
 {it_interval={0, 0}, it_value={0, 0}}) = 0

[...at this point the program hangs]

 The 5.005 patch #define sv_undef PL_sv_undef had been
 applied to Crypt-IDEA/IDEA.xs Crypt-DES/DES.xs and
 Crypt-Blowfish/Blowfish.xs


 perl --version :

 Summary of my perl5 (revision 5.0 version 6 subversion 0)
configuration:
   Platform:
     osname=linux, osvers=2.2.12-20, archname=i586-linux
     uname='linux unimportant.com 2.2.12-20 #1 mon sep 27 10:25:54 edt
1999
 i586 unknown '
     config_args='-de'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef
 usemultiplicity=undef
     useperlio=undef d_sfio=undef uselargefiles=define
     use64bitint=undef use64bitall=undef uselongdouble=undef
usesocks=undef
   Compiler:
     cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
 (egcs-1.1.2 release)
     cppflags='-fno-strict-aliasing -I/usr/local/include'
     ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE
 -D_FILE_OFFSET_BITS=64'
     stdchar='char', d_stdstdio=define, usevfork=false
     intsize=4, longsize=4, ptrsize=4, doublesize=8
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
 lseeksize=8
     alignbytes=4, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
     libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-rdynamic'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


 Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under linux
   Compiled at May  2 2000 14:19:30
   @INC:
     /usr/local/lib/perl5/5.6.0/i586-linux
     /usr/local/lib/perl5/5.6.0
     /usr/local/lib/perl5/site_perl/5.6.0/i586-linux
     /usr/local/lib/perl5/site_perl/5.6.0
     /usr/local/lib/perl5/site_perl
     .

--
JoshNarins, President, NCCPC
Perl/UNIX/RDBMS Development
When you need it yesterday and locked down like there is no tomorrow.


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 May 2000 16:33:22 GMT
From: prabhakar@chaganti.net
Subject: perl 5.6 build error
Message-Id: <mFVT4.12389$t8.138775@news.bc.tac.net>


Hi:

I am trying to build perl 5.6 on Mandrake 7.0 with 2.2.14 kernel. 
I can build the default installation without any errors. 
But I need an install with thread support. So, when I try to do a 
"make" after doing "Configure -Dusethreads", i get a bunch of errors 
about undefined references to "PL_curcop" in "opmini.o" and the make 
is aborted. I get the same error when I try to do a "make minitest". 
Can anyone point me in the right direction as to what I am doing 
wrong here. Any help/info really appreciated.

thanks
prabhakar



==================================
Posted via http://nodevice.com
Linux Programmer's Site


------------------------------

Date: Mon, 15 May 2000 17:33:15 GMT
From: <rberdeen@lane.k12.or.us>
Subject: Perl and Apache Authentication
Message-Id: <si0d6rdmrj0158@corp.supernews.com>

I am designing a web site for my school's web class from the ground up.  
There will be an area of the page that is password protected, 
using .htpasswd, and I wanted to know if Apache passes on the username as 
an enviroment variable.  I need to have the pages customized for each user.

I'm sort of new to Perl, Linux, and Apache server, but I consider ymself 
knowledgeable about computers, specifically web page design.

I know some basic perl and hoped I could just use something like 
$member_name = $ENV{"USER"};
If someone knows how to something like this, I'd really appreciate the 
help!

--
Posted via CNET Help.com
http://www.help.com/


------------------------------

Date: Mon, 15 May 2000 13:45:37 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Perl and Apache Authentication
Message-Id: <brian-1505001345370001@rtp-cr45-dhcp-100.cisco.com>

In article <si0d6rdmrj0158@corp.supernews.com>, <rberdeen@lane.k12.or.us> wrote:

>I am designing a web site for my school's web class from the ground up.  
>There will be an area of the page that is password protected, 
>using .htpasswd, and I wanted to know if Apache passes on the username as 
>an enviroment variable. 

see the references in the CGI MetaFAQ and your server documentation.
if you won't to be really spiffy, see the stuff on this topic at
www.modperl.com.

good luck :)

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



------------------------------

Date: 15 May 2000 16:51:18 GMT
From: logenews1@morelogs.de (Marc Logemann)
Subject: Perl on AS/400....
Message-Id: <8F35B15F9logemannmorelogsde@192.76.144.117>


Hi,

i just heard about the capability of perl to run on the AS/400 and
to access db2/400 database. This is pretty nice.

My questions:

1) has anyone experiences in this?
2) is it possible to access db2/400 from perl installed on a linux system?
3) if q2 = no, what would be the best way to access db2/400 data from
a linux system.

thx to all

please if somebody answer, please also mail to me privately, dont know
if i can follow this high traffic group the way i want it.

-- 
*------------------------*
*    Marc Logemann       *
*   Programmer/Analyst   *
*------------------------*


------------------------------

Date: Mon, 15 May 2000 19:01:28 +0200
From: Saddek Rehal <saddek@arch.chalmers.se>
Subject: Perl vs ActivePerl
Message-Id: <39202D68.F5CBB8AB@arch.chalmers.se>

Can someone tell me the difference between Perl 5. 03 and perl 5.6.

A part of my script look like this, and works very well under perl 5.003
but not Perl 5.6

#!/apache/Perl/bin/perl.exe      #this line is used for perl 5.003
#!/apache/ActivePerl/bin/perl.exe     #this line is used for perl 5.6
#---------------
$dateprg = "/apache/ActivePerl/bin/date1.exe";
$hdateprg = "/apache/ActivePerl/bin/hdate.exe";

require "cgi-lib.pl";
&ReadParse;
print &PrintHeader;

$hdateout= `$hdateprg`;
$dateout = `$dateprg +"%B %e, %Y"`;

print "$hdateout";
print "$dateout ";
#------------------------------

The problem is that I get only the second print statement that
"$dateout" , when I run perl 5.6
The 2 versions of Perl are of course in different directories.

I am running the script from Win NT and Apache in Netscape.

regards

Saddek Rehal




------------------------------

Date: 15 May 2000 18:28:56 +0100
From: nobull@mail.com
Subject: Re: Please Help friend on perl problem
Message-Id: <u9aehr90yv.fsf@wcl-l.bham.ac.uk>

tadmc@metronet.com (Tad McClellan) writes:

> On Sat, 13 May 2000 23:37:21 GMT, velocity <velocity@youreallythinkitsme.com> wrote:
> 
> >could you rewrite it so it is right?need it badly thanx
>                                      ^^^^^^^^^^^^^
> As soon as your check clears.

So you would accept payment to write a tool for a Usenet spammer?

> Come to clp.misc to get _help_ writing programs.

And if the purpose of the program is to perform unethical acts you
probably should try to conceal this fact.

> Go to a newsgroup with "jobs" in its name  to hire someone 
> to _write_ code for you.

Actually under the circumstances this is bad advice.  The OP would be
looking for someone who is prepred to work for a spammer.  Clearly the
simplest way to reach lots of people _and_ pre-filter out all the ones
whose ethics would prevent them working for a spammer is to spam the
job ad.  It will piss of thousands of people and get the OP booted off
any reputable ISP but that's not an issue to a spammer.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: Mon, 15 May 2000 16:16:37 GMT
From: leonarm@my-deja.com
Subject: Producing arrays from quoted csv files from excel
Message-Id: <8fp7si$g7j$1@nnrp1.deja.com>

When Excel produces a csv file from data which already contains commas it
puts double quotes around the data containing the comma. Could anyone suggest
a regular expression construction which splits the data at commas but only
those outside double quotes. Using the line below :-

01,02,"my house,my street"

an array would be formed $line[0]='01'
$line[1]='02'
$line[2]='myhouse,mystreet'

Thanks


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 May 2000 10:01:03 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Producing arrays from quoted csv files from excel
Message-Id: <39202D4F.E06BD67D@vpservices.com>

leonarm@my-deja.com wrote:
> 
> When Excel produces a csv file from data which already contains commas it
> puts double quotes around the data containing the comma. Could anyone suggest
> a regular expression construction which splits the data at commas but only
> those outside double quotes. Using the line below :-
> 
> 01,02,"my house,my street"
> 
> an array would be formed $line[0]='01'
> $line[1]='02'
> $line[2]='myhouse,mystreet'

Perlfaq4 lists a regex from Friedl's book on dealing with CSV data.  The
Text::ParseWords and Text::CSV_XS modules also handle such info.  The
DBD::CSV and DBD::RAM modules both allow you to treat a CSV file as a
database and query it.  Using DBD::RAM, this code would take an entire
file and create a reference to an array of arrayrefs so that each line
in the file was automatically entered into an array such as you
describe:

use DBI;
my $dbh=DBI->connect('DBI:RAM:','','',{RaiseError=>1});
$dbh->func({ file_source => 'test_db.csv'},'import');
my $array_ref = $dbh->selectall_arrayref('SELECT * FROM table1');
__END__

Once you had done that, assuming the line you gave above was the first
line in the CSV file you could get that same array with:

my @line = @{ $array_ref->[0] };
	
And similar arrays for any other line in the text.

On the other hand, if you use one of the DBD modules, you may have no
need of the array since you would be able to sort,search,and select any
of the fields or records easily without arrays.

Or if you prefer, DBD::ODBC would let you do the same thing directly
with the excel file, without having to dump it to CSV.

-- 
Jeff


------------------------------

Date: Mon, 15 May 2000 17:21:11 GMT
From: "Marcus" <mouimet@direct.ca>
Subject: Random Lists
Message-Id: <bmWT4.13592$au2.135016@news1.rdc1.bc.home.com>

I am trying to create a random list and seem to be missing something here is
what I am trying to start with to randomize the list:

   srand();
   @userlist = rand(@userlist);

I was able to generate and print a random number by doing this:

srand(time ^ $$);
$something= rand(@something);
print $something[$something];

    Any suggestions would be most appreciated. I am also looking at using
PHP are there many advantages with PHP over perl?





------------------------------

Date: Mon, 15 May 2000 10:14:12 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Starting another prog
Message-Id: <MPG.1389d03af658e20798aa7d@nntp.hpl.hp.com>

In article <8fohl3$n4j$1@nnrp1.deja.com> on Mon, 15 May 2000 09:56:56 
GMT, Ilja <billy@arnis-bsl.com> says...
> In article <391FC331.1F7CA592@datapharm.de>,
>   Andreas Huber <ah@datapharm.de> wrote:
> >
> > how can I start another prog out of my perl-script, without keeping
> > alive my main-script?
> 
> perldoc -f exec
> 
> (or http://www.cpan.org/doc/manual/html/pod/perlfunc/exec.html)

Ouch.  That is the WRONG answer, though it would become very clear to 
anyone who reads the first paragraph of the document you refer to that 
it is wrong, and what the correct answer is.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

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 3051
**************************************


home help back first fref pref prev next nref lref last post