[13808] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1218 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 29 06:05:56 1999

Date: Fri, 29 Oct 1999 03:05:29 -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: <941191529-v9-i1218@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 29 Oct 1999     Volume: 9 Number: 1218

Today's topics:
    Re: $formdata=~s/\s+$//;   ? <hmaster@factory.co.kr>
        [offtopic] English <nobody@nowhere.net>
    Re: Circular buffering (Neil Cherry)
    Re: Circular buffering (Neil Cherry)
    Re: Circular buffering <bivey@teamdev.com>
    Re: comparing text with words (Bart Lateur)
    Re: comparing text with words (Abigail)
    Re: control characters from perl TCP read/write (Greg Andrews)
    Re: control characters from perl TCP read/write <slanning@bu.edu>
        DBD::oracle  make error... <moya@dreamhouse.co.kr>
    Re: DBI Module help <montuori@acs.neu.edu>
    Re: Forcing a download (Abigail)
        Globbing files in dir and subdirs <22pb22@excite.com>
        HELP: Win32 Module Programming Questions! <I.J.Dash@cs.cf.ac.uk>
    Re: How di I join a string together? (Bart Lateur)
    Re: How di I join a string together? <jonathan.stowe@dircon.net>
    Re: How di I join a string together? <gellyfish@gellyfish.com>
        How do I determine the size of a remote http file? (Jonathan Chum)
    Re: How do I determine the size of a remote http file? (brian d foy)
    Re: How parse a,b,"x,y",c (Holger Marzen)
    Re: length (number of items) of an array (Abigail)
    Re: length (number of items) of an array (Martien Verbruggen)
    Re: Outlook <gellyfish@gellyfish.com>
    Re: Pack function in Active Perl (win32) buggy? <lars.soderstrom@capgemini.fi>
    Re: perl lang parser (Ilya Zakharevich)
    Re: perl lang parser (Ilya Zakharevich)
    Re: perlguts question <rhomberg@ife.ee.ethz.ch>
        postgres and perl (Lasengo)
    Re: postgres and perl <mark.bluemelNOmaSPAM@siemens.co.uk.invalid>
    Re: Q: digit-wise number comparisons ? <rhomberg@ife.ee.ethz.ch>
    Re: Q: Hashes of Hashes of Hashes <bexxx@hasiland.com>
    Re: Which Search engine script? (Mike Thompson)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 29 Oct 1999 18:36:59 +0900
From: "Yeong Mo/Director Hana co." <hmaster@factory.co.kr>
Subject: Re: $formdata=~s/\s+$//;   ?
Message-Id: <qURA39eI$GA.162@news.thrunet.com>

Then, What is for $line=~s/!(\d+)!/$fields[$1]/g;    ?




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

Date: 29 Oct 1999 08:04:17 GMT
From: Stephen Lee - Post replies please <nobody@nowhere.net>
Subject: [offtopic] English
Message-Id: <7vbke1$q9l4@nntp.cig.mot.com>

In article <s0vb2a37r0184@corp.supernews.com>,
Craig Berry <cberry@cinenet.net> wrote:
>paranoid (genlabs@gmx.net) wrote:
>: Craig Berry <cberry@cinenet.net> schrieb in im Newsbeitrag:
>: s0uk275er0159@corp.supernews.com...
>: > paranoid (genlabs@gmx.net) wrote:
>: > : Ì hope anyone of you can answer my question,
>: > : and mildly ignore it's dumbness .
>: >
>: > If and only if you pledge never to place an apostrophe in possessive
>: > 'its', ever again, so long as you shall live.
>: 
>: Excuse me ? Is this comp.lang.perl.misc ? I'm relieved , for a moment I
>: thought it was
>: alt.languages.english.grammar . Arrogancy could be taken for a lack of
>: self-esteem...
>
>Not arrogance, frustration.  If English is not your first language, I
>apologize.  But this simple mistake is becoming infuriatingly common.  I
>did try to phrase my comment in an amusing way.  Sorry it didn't come
>across as intended.

Sorry for being off-topic, but can you explain why you are frustrated?
I don't see any possessive "its" in the original quote...

Stephen


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

Date: Fri, 29 Oct 1999 04:05:51 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Re: Circular buffering
Message-Id: <slrn81i769.h9e.njc@dmc.uucp>

On Thu, 28 Oct 1999 07:30:22 -0700, Larry Rosler wrote:
>In article <slrn81gh51.dv5.njc@dmc.uucp> on Thu, 28 Oct 1999 12:43:28 
>GMT, Neil Cherry <njc@dmc.uucp> says...
>> On 27 Oct 1999 22:49:38 -0700, Greg Andrews wrote:
>> >ncherry@home.net writes:
>
>...
>
>> >>I see I have caused some confusion but I have gained further knowledge
>> >>in the process. I was unaware of push/pull shift/unshift etc.
>
>That's 'push/pop'.
>
>...
>
>> Just memory cells, usually one after another (a lifo). Which makes me
>> think that I need to reread the books to get a better understnading of
>> the pointers, arrays and the push/pull (etc) commands.
>
>That's still 'push/pop'.
>
>Shades of Dr. Doolittle.  :=)

Actually shades of 6502 assembly language programming :-).

-- 
Linux Home Automation           Neil Cherry             ncherry@home.net
http://members.home.net/ncherry                         (Text only)
http://meltingpot.fortunecity.com/lightsey/52           (Graphics GB)



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

Date: Fri, 29 Oct 1999 04:07:25 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Re: Circular buffering
Message-Id: <slrn81i798.h9e.njc@dmc.uucp>

On Thu, 28 Oct 1999 15:06:22 GMT, Bart Lateur wrote:
>Neil Cherry wrote:
>
>>What I meant by circular buffers is a fixed size array were a pointer
>>points to the current position in the array to put new characters and
>>a pointer that points to the last read character. I come from an
>>assembly/C background and these are common in interrupt routines.
>
>	my @array = ('A'..'H');
>	my $pointer = 0;
>	for my $i (1..50) {
>	    print $array[$pointer];
>	} continue {
>	    $pointer++; $pointer %= 8;
>	}
>
>You can do
>	
>	$array[$pointer] = 'blah!';
>
>too. So, what's the problem?

Stupidity! Honest I don't remember seening that in my Perl books
(which means I haven' read it properly!).

-- 
Linux Home Automation           Neil Cherry             ncherry@home.net
http://members.home.net/ncherry                         (Text only)
http://meltingpot.fortunecity.com/lightsey/52           (Graphics GB)



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

Date: 28 Oct 1999 15:29:53 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: Circular buffering
Message-Id: <01bf2159$842534a0$3527e1ce@bill.jump.net>

Neil Cherry <njc@dmc.uucp> wrote in article
<slrn81f9n2.b7n.njc@dmc.uucp>...
> On 27 Oct 1999 17:37:35 GMT, M.J.T. Guy wrote:
> What I meant by circular buffers is a fixed size array were a pointer
> points to the current position in the array to put new characters and
> a pointer that points to the last read character. I come from an
> assembly/C background and these are common in interrupt routines. I
> have to read characters from the serial port and need to send a bunch
> first then react to the characters then send a response based on the
> the characters just read.

If you need to send strings you might want to look up the
substr function. It would give you access to single characters
as in an array, but also let you deal with strings of
arbitrary length easily. It can be used as an r- or lvalue
(but if you're assigning, it likes the assignment to be
within the span of the string). Predefine a string of
appropriate length (e.g. my $buffer = ' ' x 100;) and you're
all set. -Wm



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

Date: Fri, 29 Oct 1999 06:39:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: comparing text with words
Message-Id: <381a402b.1104322@news.skynet.be>

Abigail wrote, about "barewords":

>Larry Rosler (lr@hpl.hp.com) wrote:
>
>.. But in hash keys or left of =>, nothing will save you.
>
>It used to give a warning. But nowadays, it doesn't.

Good riddance. I like simple concepts, and the concept here is that
inside a hash index, and left of "=>", a bare word is a bareword, a
literal string. No exception.

Personally, I'd like to see the use of bare words in all *other*
circumstances to be simply banned. This is ridiculous:

  use SDBM_File;
  tie %hash, 'SDBM_File', $dbfile, O_RDWR|O_CREAT, 0644) 
	or die "Cannot tie: $!";

-->

  Argument "O_SVWST" isn't numeric


Huh? Where did that come from?

Answer: Fcntl wasn't imported, so "O_RDWR" and "O_CREAT" were treated as
ordinary strings ("barewords"), and OR-red, bitwise as strings, with
"O_SVWST" as result.

Ban those damn' barewords. They're just bugs waiting to happen. *At
runtime*.

-- 
	Bart.


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

Date: 29 Oct 1999 04:06:36 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: comparing text with words
Message-Id: <slrn81iors.66b.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCCL September MCMXCIII in
<URL:news:381a402b.1104322@news.skynet.be>:
// Abigail wrote, about "barewords":
// 
// >Larry Rosler (lr@hpl.hp.com) wrote:
// >
// >.. But in hash keys or left of =>, nothing will save you.
// >
// >It used to give a warning. But nowadays, it doesn't.
// 
// Good riddance. I like simple concepts, and the concept here is that
// inside a hash index, and left of "=>", a bare word is a bareword, a
// literal string. No exception.

Which it is. Of which Randal (according to Larry) that that will cause
problems for the unaware. Or even for the aware. I have been bitten by
writing things like:

    while (<>) {chomp; $hash {lc} = 1;}

The problem is that there aren't exceptions..... ;-)

// Personally, I'd like to see the use of bare words in all *other*
// circumstances to be simply banned. This is ridiculous:
// 
//   use SDBM_File;
//   tie %hash, 'SDBM_File', $dbfile, O_RDWR|O_CREAT, 0644) 
// 	or die "Cannot tie: $!";
// 
// -->
// 
//   Argument "O_SVWST" isn't numeric
// 
// 
// Huh? Where did that come from?
// 
// Answer: Fcntl wasn't imported, so "O_RDWR" and "O_CREAT" were treated as
// ordinary strings ("barewords"), and OR-red, bitwise as strings, with
// "O_SVWST" as result.

Only a problem if you don't use "use strict". Autostringifying barewords
is sometimes useful in one-liners.

// Ban those damn' barewords. They're just bugs waiting to happen. *At
// runtime*.

use strict; catches them *at compiletime*. If you don't use use strict;
you're on your own anyway.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 28 Oct 1999 23:13:46 -0700
From: gerg@shell.ncal.verio.com (Greg Andrews)
Subject: Re: control characters from perl TCP read/write
Message-Id: <7vbduq$i6h$1@shell1.ncal.verio.com>

"J.Z> Brody" <NOSPAMjeff.broitman@NOSPAMcybertrust.gte.com> writes:
>Perhaps you've seen this?
>
>Using an IO::Socket connection I'm passing data back and forth and
>getting some control character with the newline (\n) as well...
>

It's a Carriage Return.

>
>EG:
>

Add this before the code that read from the socket:

$/ = "\r\n";

>print $HANDLE "What is your name: ";
>$response = <$HANDLE>

Rewrite this as:

  chomp($response = <$HANDLE>);

>____
>
>I split it to an array to look at it char by char...
>Here's how I printed it out.
>foreach $item (@array){
>    print "[$item]\n";
>}
>

Now you'll get just the typed portion of the line, without
the \r\n end-of-line characters.

  -Greg
-- 
:::::::::::::::::::  Greg Andrews  gerg@wco.com  :::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


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

Date: 29 Oct 1999 03:26:31 -0400
From: Scott Lanning <slanning@bu.edu>
Subject: Re: control characters from perl TCP read/write
Message-Id: <kus7lk6lja0.fsf@bottom.bu.edu>

"J.Z> Brody" <NOSPAMjeff.broitman@NOSPAMcybertrust.gte.com> writes:
> Here's what I got for "foo"
> 
> [f]
> [o]
> [o]
> ][
> [
> ]

Is it "foo\r\n" ?

\r = carriage return
\n = newline

-- 
qualification: I'm a dimwit according to someone who emailed me


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

Date: Fri, 29 Oct 1999 17:25:09 +0900
From: moya <moya@dreamhouse.co.kr>
Subject: DBD::oracle  make error...
Message-Id: <381959E5.45F8589C@dreamhouse.co.kr>

MIME Çü½ÄÀÇ ¸ÖƼ-ÆÄÆ® ¸Þ½ÃÁöÀÔ´Ï´Ù.
--------------6E75EA0A0B75C5FF7ED3F018
Content-Type: text/plain; charset=EUC-KR
Content-Transfer-Encoding: 7bit

 
--------------6E75EA0A0B75C5FF7ED3F018
Content-Type: text/plain; charset=EUC-KR; name="perl_make"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; filename="perl_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/Oracle
mkdir ./blib/lib/auto
mkdir ./blib/lib/auto/DBD
mkdir ./blib/lib/auto/DBD/Oracle
mkdir ./blib/man1
mkdir ./blib/man3
cp Oraperl.pm ./blib/lib/Oraperl.pm
cp Oracle.pm ./blib/lib/DBD/Oracle.pm
cp perl_makefile.pl ./blib/lib/DBD/perl_makefile.pl
cp oraperl.ph ./blib/lib/oraperl.ph
	/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" < /usr/local/lib/perl5/site_pe=
rl/PA-RISC2.0/auto/DBI/Driver.xst > Oracle.xsi
	/usr/bin/perl -I/usr/local/lib/perl5/PA-RISC2.0/5.00405 -I/usr/local/lib=
/perl5 /usr/local/lib/perl5/ExtUtils/xsubpp  -typemap /usr/local/lib/perl=
5/ExtUtils/typemap Oracle.xs >Oracle.tc && mv Oracle.tc Oracle.c
	cc -c -I/oracle/app/oracle/product/805/rdbms/demo -I/oracle/app/oracle/p=
roduct/805/rdbms/public -I/oracle/app/oracle/product/805/plsql/public -I/=
oracle/app/oracle/product/805/network/public -I/oracle/app/oracle/product=
/805/rdbms/demo -I/oracle/app/oracle/product/805/rdbms/demo -I/usr/local/=
lib/perl5/site_perl/PA-RISC2.0/auto/DBI -D_HPUX_SOURCE -Ae -O     -DVERSI=
ON=3D\"1.01\"  -DXS_VERSION=3D\"1.01\" +z -I/usr/local/lib/perl5/PA-RISC2=
=2E0/5.00405/CORE  Oracle.c
	cc -c -I/oracle/app/oracle/product/805/rdbms/demo -I/oracle/app/oracle/p=
roduct/805/rdbms/public -I/oracle/app/oracle/product/805/plsql/public -I/=
oracle/app/oracle/product/805/network/public -I/oracle/app/oracle/product=
/805/rdbms/demo -I/oracle/app/oracle/product/805/rdbms/demo -I/usr/local/=
lib/perl5/site_perl/PA-RISC2.0/auto/DBI -D_HPUX_SOURCE -Ae -O     -DVERSI=
ON=3D\"1.01\"  -DXS_VERSION=3D\"1.01\" +z -I/usr/local/lib/perl5/PA-RISC2=
=2E0/5.00405/CORE  dbdimp.c
	cc -c -I/oracle/app/oracle/product/805/rdbms/demo -I/oracle/app/oracle/p=
roduct/805/rdbms/public -I/oracle/app/oracle/product/805/plsql/public -I/=
oracle/app/oracle/product/805/network/public -I/oracle/app/oracle/product=
/805/rdbms/demo -I/oracle/app/oracle/product/805/rdbms/demo -I/usr/local/=
lib/perl5/site_perl/PA-RISC2.0/auto/DBI -D_HPUX_SOURCE -Ae -O     -DVERSI=
ON=3D\"1.01\"  -DXS_VERSION=3D\"1.01\" +z -I/usr/local/lib/perl5/PA-RISC2=
=2E0/5.00405/CORE  oci7.c
	cc -c -I/oracle/app/oracle/product/805/rdbms/demo -I/oracle/app/oracle/p=
roduct/805/rdbms/public -I/oracle/app/oracle/product/805/plsql/public -I/=
oracle/app/oracle/product/805/network/public -I/oracle/app/oracle/product=
/805/rdbms/demo -I/oracle/app/oracle/product/805/rdbms/demo -I/usr/local/=
lib/perl5/site_perl/PA-RISC2.0/auto/DBI -D_HPUX_SOURCE -Ae -O     -DVERSI=
ON=3D\"1.01\"  -DXS_VERSION=3D\"1.01\" +z -I/usr/local/lib/perl5/PA-RISC2=
=2E0/5.00405/CORE  oci8.c
Running Mkbootstrap for DBD::Oracle ()
	chmod 644 Oracle.bs
	LD_RUN_PATH=3D"/oracle/app/oracle/product/805/lib:/lib" ld -o ./blib/arc=
h/auto/DBD/Oracle/Oracle.sl  -b -L/usr/local/lib Oracle.o  dbdimp.o  oci7=
=2Eo  oci8.o /oracle/app/oracle/product/805/rdbms/lib/ssdbaed.o /oracle/a=
pp/oracle/product/805/rdbms/lib/defopt.o /oracle/app/oracle/product/805/l=
ib/nautab.o /oracle/app/oracle/product/805/lib/naeet.o /oracle/app/oracle=
/product/805/lib/naect.o /oracle/app/oracle/product/805/lib/naedhs.o -l:l=
ibcl.a    -L/oracle/app/oracle/product/805/lib/ -lclntsh -lnetv2 -lnttcp =
-lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lclient -lvsn -lcommon -lgener=
ic -lmm -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 -lnttcp -ln=
etwork -lncr -lnetv2 -lnttcp -lnetwork -lclient -lvsn -lcommon -lgeneric =
-lepc -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lclient -lvsn -lcomm=
on -lgeneric -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lrt -lpthread=
 -ldld -lm -lpthread -lpthread =

*** Error exit code 1

--------------6E75EA0A0B75C5FF7ED3F018--



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

Date: 26 Oct 1999 12:52:43 -0400
From: kevin montuori <montuori@acs.neu.edu>
Subject: Re: DBI Module help
Message-Id: <yge7lka6p44.fsf@spot.acs.neu.edu>

>>> nigh postal writes:

  np> I need a way to grab the column names for a particular table and
  np> store them into an array.

      perldoc DBI and look for NAME and NAME_lc.

      cheers,
      k.

-- 

kevin montuori            



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

Date: 28 Oct 1999 23:37:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Forcing a download
Message-Id: <slrn81i934.66b.abigail@alexandra.delanet.com>

E. Preble (preble@ipass.net) wrote on MMCCL September MCMXCIII in
<URL:news:vb7S3.885$A3.1874@news.ipass.net>:
## I have an autoforwarding script that forwards to a
## downloadable file (after counting a hit to it). The
## forwarding part of the script is:
## 
## print "Content-type: text/html\n";
## print "Location: $DownloadFile\n\n";
## 
## The problem is that with Netscape, if the MIME type of the
## file isn't defined properly on the server, Netscape will not
## prompt to download the file, but rather display the file
## (which will be garble). With a link, the file can be forced
## to download with a Shift-Click on the link.  Is it possible
## to mimic this behavior with the PERL print commands?

No. And why should you? The answer to your "problem" is trivial.
Send the appropriate Content-type.

## A default solution is to simply forward to a page that says
## "Press shift and click this link for your download", but it
## would be nice to make it automatic.

Press shift and click looks awfully funny in a browser that doesn't
use shift + click to download.

Now, what has all this to do with Perl?


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 28 Oct 1999 20:59:35 -0700
From: "PB" <22pb22@excite.com>
Subject: Globbing files in dir and subdirs
Message-Id: <7vb63j$hr1$1@ash.prod.itd.earthlink.net>

Hello all,

I have a script that's globbing files from a $dir into an array @files.  It
does this no problem:
    chdir ($dir) || die "Cannot cd to $dir: $!";
    @files = <*.log>;

However what I need it to do is to also grab all the files in sub-dirs and
also put 'em in the same @files array.  I read on a recent post that
File::Find can do this.  Can anyone out there shed some light into "how to"?

cheers,
pb





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

Date: Fri, 29 Oct 1999 07:41:36 GMT
From: Ian Dash <I.J.Dash@cs.cf.ac.uk>
Subject: HELP: Win32 Module Programming Questions!
Message-Id: <7vbj3g$9c4$1@nnrp1.deja.com>

Hi,
   having sucessfully built my first Win32 extension and built it into a
nice package to be installed via ppm I have a few questions/loose ends
to tie up.....

1. In my original C source I have a function that is declared as
   follows:

char *getPrivateKey(char *keyname);

now the xsubpp'ed C file declaration for this function is.....

XS(XS_EBS__Encrypt_getPrivateKey)
{
    dXSARGS;
    if (items != 1)
	croak("Usage: EBS::Encrypt::getPrivateKey(keyname)");
    {
	char *	keyname = (char *)SvPV(ST(0),PL_na);
	char *	RETVAL;

	RETVAL = getPrivateKey(keyname);
	ST(0) = sv_newmortal();
	sv_setpv((SV*)ST(0), RETVAL);
    }
    XSRETURN(1);
}

Since I  'malloc' space for the string inside the C function for the
return value does the sv_newmortal on the XSUB stack [above] mean that I
don't have to worry about freeing the space I originally malloc'ed and
that perl will garbage collect it when the reference count is zero?

2. In the perlmod/perlmodlib perldocs it says to use @EXPORT_OK in
preference to @EXPORT, when I export my functions with @EXPORT all goes
fine - not so with @EXPORT_OK, I get an 'undefined subroutine
&main::getPrivateKey' kind of error. A snippet from the .pm file is
below, is there something I'm doing wrong?

package EBS::Encrypt;

use strict;
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);

require Exporter;
require DynaLoader;
require AutoLoader;

@ISA = qw(Exporter DynaLoader);

#BELOW DOESN'T WORK!
#@EXPORT_OK = qw(&encryptFile &encrypt &getPublicKey &getPrivateKey
#&decrypt);

#WORKS!
@EXPORT = qw(&encryptFile &encrypt &getPublicKey &getPrivateKey
&decrypt);

$VERSION = '0.01'

3. When I build the package - the makefile moves a couple of libraries
that I statically link in into the blib directory....this means that
when I make the ppd package that they're zipped in with everything -
surely when I've produced my pll I don't need them to be included with
the module bits.

4. Finally, what are all the directorys under blib used for  - the
lib/auto I know about, but what about man3 etc? And how do I add an HTML
version of my POD files to the Activestate HTML help index, a couple of
modules seem to do this when they're installed and I'd like to know how
it's done!

Thanks in advance for your help.

Ian Dash


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


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

Date: Fri, 29 Oct 1999 05:40:59 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How di I join a string together?
Message-Id: <3819331a.410344@news.skynet.be>

I forgot about interpolation.

  $FORM{'domain1'} = hello
  $FORM{'domain2'} = bye

  $hostname = "$FORM{'domain1'}$FORM{'domain2'}";

TIMTOWTDI.

-- 
	Bart.


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

Date: Fri, 29 Oct 1999 09:47:28 +0100
From: Jonathan Stowe <jonathan.stowe@dircon.net>
To: Uri Guttman <uri@sysarch.com>
Subject: Re: How di I join a string together?
Message-Id: <Pine.WNT.4.10.9910290946060.-365021@desktop83.dircon.net>


<Posted and Mailed>

On 28 Oct 1999, Uri Guttman wrote:

> >>>>> "JS" == Jonathan Stowe <gellyfish@gellyfish.com> writes:
> 
>   JS> On Thu, 28 Oct 1999 14:25:02 GMT Clinton Pierce wrote:
> 
>   >>> Now I want to join 'hello' and 'bye' together and put them in $hostname.
>   >>> Like hostname = 'hello' + 'bye'
>   >> 
>   >> $hostname="$FORM{domain1}$FORM{domain2}";
> 
>   JS> Purleeze Clint - thats just sooo lame :
> 
> didn't i start a thread a few weeks back on the worst ways to join
> strings? i am too lazy this moment to check deja.
> 

Indeed you did dear Uri,  but I'm even lazier - I copied the same but of
code I posted on that occasion ;-}

/J\
-- 
Jonathan Stowe <mailto:Jonathan.Stowe@dircon.net>
Analyst/Programmer, Direct Connection
Martin House, 1 Tranquil Vale, Blackheath, London SE3
<http://www.dircon.net> 



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

Date: 29 Oct 1999 09:55:49 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How di I join a string together?
Message-Id: <38196115_2@newsread3.dircon.co.uk>

Jonathan Stowe <jonathan.stowe@dircon.net> wrote:
> 
> <Posted and Mailed>
> 
> On 28 Oct 1999, Uri Guttman wrote:
> 
>> >>>>> "JS" == Jonathan Stowe <gellyfish@gellyfish.com> writes:
>> 
>>   JS> On Thu, 28 Oct 1999 14:25:02 GMT Clinton Pierce wrote:
>> 
>>   >>> Now I want to join 'hello' and 'bye' together and put them in $hostname.
>>   >>> Like hostname = 'hello' + 'bye'
>>   >> 
>>   >> $hostname="$FORM{domain1}$FORM{domain2}";
>> 
>>   JS> Purleeze Clint - thats just sooo lame :
>> 
>> didn't i start a thread a few weeks back on the worst ways to join
>> strings? i am too lazy this moment to check deja.
>> 
> 
> Indeed you did dear Uri,  but I'm even lazier - I copied the same but of
> code I posted on that occasion ;-}
> 

Ooo - Pine viciously shags up the references header ....

/J\
-- 
"I'm not Carol Vorderman - you wouldn't see me getting drunk in a kebab
shop" - Lily Savage


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

Date: Fri, 29 Oct 1999 03:45:02 GMT
From: jchum@jps.net (Jonathan Chum)
Subject: How do I determine the size of a remote http file?
Message-Id: <3819179a.22732488@news.jps.net>

I am trying to determine file size, preferably a zip file which is on
a remote http server by a url without downloading the entire file if
at all possible. Can LWP do that? How would I do that? An simple
example or small routine would be nice.


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

Date: Fri, 29 Oct 1999 00:51:11 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: How do I determine the size of a remote http file?
Message-Id: <brian-2910990051110001@97.new-york-60rs.ny.dial-access.att.net>

In article <3819179a.22732488@news.jps.net>, jchum@jps.net (Jonathan Chum) wrote:

>I am trying to determine file size, preferably a zip file which is on
>a remote http server by a url without downloading the entire file if
>at all possible. Can LWP do that? How would I do that? An simple
>example or small routine would be nice.

the trick is to get the Content-Length header to be sent by the
server.  Apache, by default, doesn't do this for HEAD requests.  you
might have to perform a GET and only read the header, although that
is kludgey.  the LWP docs have examples of this sort of thing.

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



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

Date: 29 Oct 1999 08:24:12 GMT
From: hm@sik-gmbh.de (Holger Marzen)
Subject: Re: How parse a,b,"x,y",c
Message-Id: <7vbljc$fnr$1@sally.sik-gmbh.de>

In article <a8r9v7.q2h.ln@magna.metronet.com>,
	tadmc@metronet.com (Tad McClellan) writes:
> Holger Marzen (hm@sik-gmbh.de) wrote:
> 
>: How can I split a line into words. The word separator is ,
>: However it can be part of words if they are surrounded with "
> 
>: Any ideas?
> 
> 
>    One idea would be to check the Perl FAQ *before* posting
>    to the Perl newsgroup like someone with _good_ manners
>    would have done.

ACK. I couldn't find the faq although it was that near: perldoc perlfaq.
Our newsserver had not enough articles so that I could find the hints.
Sorry for the inconvenience, I've cancelled my article.


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

Date: 29 Oct 1999 00:06:50 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: length (number of items) of an array
Message-Id: <slrn81iaqc.66b.abigail@alexandra.delanet.com>

that's my address' Newton (nospam.newton@gmx.li) wrote on MMCCL September
MCMXCIII in <URL:news:381919d0.424586352@news.nikoma.de>:
** On 28 Oct 1999 14:40:09 GMT, gbacon@ruby.itsc.uah.edu (Greg Bacon)
** wrote:
** 
** >        return 0 if $#_ == -1;
** 
** What if someone outside of your subroutine fiddles with $[ ?


Heh, there's a reason why that's deprecated.


Why is it that it's deprecated, every seems to be saying "don't do that",
yet the possibility of doing so is raised again and again?



Abigail
-- 
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
         ${qq$\x5F$} = q 97265646f9 and s g..g;
         qq e\x63\x68\x72\x20\x30\x78$&eggee;
         {eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 29 Oct 1999 06:56:28 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: length (number of items) of an array
Message-Id: <wybS3.195$Qv3.3251@nsw.nnrp.telstra.net>

On 29 Oct 1999 00:06:50 -0500,
	Abigail <abigail@delanet.com> wrote:
> that's my address' Newton (nospam.newton@gmx.li) wrote on MMCCL September
> MCMXCIII in <URL:news:381919d0.424586352@news.nikoma.de>:
> ** On 28 Oct 1999 14:40:09 GMT, gbacon@ruby.itsc.uah.edu (Greg Bacon)
> ** wrote:
> ** 
> ** >        return 0 if $#_ == -1;
> ** 
> ** What if someone outside of your subroutine fiddles with $[ ?
> 
> 
> Heh, there's a reason why that's deprecated.
> 
> 
> Why is it that it's deprecated, every seems to be saying "don't do that",
> yet the possibility of doing so is raised again and again?

Because it is possible, and if you don't mention it, someone will
follow up to your post and poit out that you didn't quote all of the
possibilities.

Just some prevention :)

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd.   | bundled with your Microsoft product.
NSW, Australia                  | 


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

Date: 29 Oct 1999 10:01:55 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Outlook
Message-Id: <38196283_2@newsread3.dircon.co.uk>

Samay <samay1NOsaSPAM@hotmail.com.invalid> wrote:
> Hi, I get junk emails in a particular format..
> I would like to delete the other content and only want to retain useful
> content..
> 

If as your subject line suggests your are using the appalling Outlook
then you can build a few rudimentary rules with that - I would ask
in a microsoft.* newsgroup.


/J\
-- 
"Like Anne Robinson in a Korean restaurant, it'll be dog eat dog" -
Graham Norton


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

Date: Fri, 29 Oct 1999 08:21:31 GMT
From: "Lars Soderstrom" <lars.soderstrom@capgemini.fi>
Subject: Re: Pack function in Active Perl (win32) buggy?
Message-Id: <fOcS3.60$wU6.2337@read2.inet.fi>

Ok, this is the code I have used:

         $fields[$j] =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;

this is to convert the different parts of a command string, received from a
html-form with get-method, to a readable&printable string.

/Lars

The Glauber wrote in message <7v9tj8$2da$1@nnrp1.deja.com>...
>In article <6sXR3.233$ZB5.3758@read2.inet.fi>,
>  "Lars Soderstrom" <lars.soderstrom@capgemini.fi> wrote:
>> Hello,
>>
>> I came across a awkward feature (I think) of the pack-function
 ....

>Could you post a short example?
>
>--
>Glauber Ribeiro
>theglauber@my-deja.com
>"Opinions stated are my own and not representative of Experian"
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.




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

Date: 29 Oct 1999 05:54:36 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl lang parser
Message-Id: <7vbcqs$6k6$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Scott Lanning 
<slanning@bu.edu>],
who wrote in article <kusemeeluzu.fsf@bottom.bu.edu>:
> Well, I meant it for general Perl code. Obviously perl can lex/parse
> Perl code, so I just meant that you should be able to write a non-perl
> program which lex/parses a Perl program for

Here is where you are wrong.  You cannot [*] parse a perl program
without *executing* all the modules it 'use's.  And if something can
execute Perl, this "something" is called perl.  ;-)

Ilya

[*] You can expect to get some approximation which will work in many
    cases.  See CPerl for reference. ;-)


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

Date: 29 Oct 1999 06:22:21 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl lang parser
Message-Id: <7vbeet$756$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to lt lindley 
<lee.lindley@bigfoot.com>],
who wrote in article <7vb3cc$16b$1@rguxd.viasystems.com>:
> :>???  [Nobody can predict how a given Perl code will work (with a few
> :>      exceptions).  Things change a lot, almost nothing is documented.]
> :>      "Rules" exist, but are not yet written down.
> :>         
> 
> Bullshit.  I may not be able to prove mathematically that a
> given Perl program will yield a specific result, but I live
> in the real world and the emperical evidence is good enough
> for me.

Well, this is your problem.  Spend more time with Perl, and you will
see the light of the day too.

> The Perl code I write works the way I predict based on what I read
> in the documentation (mostly :-).

I do not think so.  Although "I think the Perl code I write works the
way I predict" is quite believable from a "relative newbie".

If you want proofs/confirmations, look in the archives.  Just note all
the people running (and discussing!) benchmarks for MTOWTDI, only to
discover after several days that the code they were benchmarking was
not doing what they thought it does.

Ilya


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

Date: Fri, 29 Oct 1999 10:41:56 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: perlguts question
Message-Id: <38195DD4.74B522A1@ife.ee.ethz.ch>

Ilya Zakharevich wrote:
> 
> [A complimentary Cc of this posting was sent to Mitchell Morris
> <mitchell@morrisland.com>],
> who wrote in article <slrn81gth9.mmc.mgm@unpkhswm04.bscc.bls.com>:
> > As always, it depends on what you want. If you only want a copy of the
> > reference itself, you can use newSVsv().
> 
> In most cases this is an overkill.
> 
>   return SvREFCNT_inc(rv);
> 
> is usually OK.

Thanks Ilya, I was hoping to hear from you after seeing your name in the
newsgroup and in the perlguts documentation.
Can you explain a bit more? All perlguts says about that function is:

           SV* SvREFCNT_inc(SV* sv);

       SvREFCNT_inc
               Increments the reference count of the given SV.

                       void    SvREFCNT_inc (SV* sv)

So it is not very verbose about what is returned.

The idea behind this is to convert C structs automagically to perl
structs
If I have
list->next->prev = list, the pointer is looked up in a global hash for
earlier conversion 
if a pointer was encountered earlier, a reference to that struct is
retrieved from the global hash. I need a copy of that reference.

- Alex


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

Date: Fri, 29 Oct 1999 05:51:17 GMT
From: lasingero@hotmail.com (Lasengo)
Subject: postgres and perl
Message-Id: <3819358b.1987645@news.loop.com>

i have redhat 5.1 and running postgresql. my database is up and
running... i want to use perl to access the postgres database and
generate the resultset in html. how  can i use perl to do this? do i
need dbd/dbi?

thanks for any info....


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

Date: Fri, 29 Oct 1999 01:17:46 -0700
From: Mark Bluemel <mark.bluemelNOmaSPAM@siemens.co.uk.invalid>
Subject: Re: postgres and perl
Message-Id: <0221c012.23a29499@usw-ex0101-001.remarq.com>

In article <3819358b.1987645@news.loop.com>, lasingero@hotmail.com
(Lasengo) wrote:
> i have redhat 5.1 and running postgresql. my database is up and
> running... i want to use perl to access the postgres database and
> generate the resultset in html. how  can i use perl to do this? do
> i
> need dbd/dbi?

I'm wary of diving in as I'm a relative newbie... But, from my reading,
the DBI + DBD::Pg modules are what you need, together with the CGI
module for the HTML handling.

As I see it, DBI + DBD::xyz has the _great_ advantage that you can
change the backend database from "xyz" to "qwerty" fairly simply, by
loading a different DBD:: module.

Mark Bluemel
Not yet a perl hacker


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Fri, 29 Oct 1999 11:03:40 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Q: digit-wise number comparisons ?
Message-Id: <381962EC.F928841E@ife.ee.ethz.ch>

M.J.T. Guy wrote:
> 
> Alex Rhomberg  <rhomberg@ife.ee.ethz.ch> wrote:
> >
> >The best you can do is take every 11th number.
> >In my test using random numbers, it was really slowing down with >60_000
> >numbers found.
> 
> Hardly "the best", since it doesn't make all combinations equally likely.

could you please back your argument up with some data.
Show me a list of numbers that fits the specification and contains more
elements than mine:
@nums = map {$_ * 11} (0..90909);
This contains 90910 number. I think it is the most that can be found.

> Abigail showed how to do this properly, with an O(N) algorithm which
> ought to have quite a small constant.

Abigail showed an algo that shows if a new number is acceptable or not,
nothing else. Take a look at my post there, (which I wrote
independently) that does almost exactly the same, only nicer :-)
- Alex


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

Date: Fri, 29 Oct 1999 09:14:25 +0200
From: Ralf Beckers <bexxx@hasiland.com>
Subject: Re: Q: Hashes of Hashes of Hashes
Message-Id: <38194951.99AE4622@hasiland.com>

Hi Clinton,

Clinton Pierce wrote:
> >dummy question:
> Actually, it is.

> >how can I access (read/write) hashes of hashes of hashes?
> >In the docs I only found "hashes of hashes" ...
> Have you no imagination?
I tried doubeling they =>, but maybe I typed s.th. wrong in, cause this
didn't work.
So, after that, I asked the list.

This is okay for you?

Ralf Beckers


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

Date: Fri, 29 Oct 1999 07:30:07 GMT
From: mpthompson@home.net (Mike Thompson)
Subject: Re: Which Search engine script?
Message-Id: <38194a86.88563271@news.smateo1.sfba.home.com>

On Mon, 27 Sep 1999 14:19:24 +0800, "van Weelden" <cim@cim-net.com>
wrote:
>I have a homepage with information of different companies. Now I want to =
>install a search engine on this homepage, but which script is the best =
>and easy to use? It must be possible to search HTML pages with keywords. =
>But it must also be possible to look for a specific company name, =
>country, etc...
>If you know a good script, let me know.

Give www.atomz.com a try. It is a free search engine service 
that is very easy to add to any web site.  It is the same search
service used by some very large high-capacity sites such as
www.oreilly.com, www.webmonkey.com, and many others, 
but the same exact search engine is available for free to 
smaller sites.

Mike Thompson



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

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


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