[15669] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3082 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 18 00:05:37 2000

Date: Wed, 17 May 2000 21:05:08 -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: <958622708-v9-i3082@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 17 May 2000     Volume: 9 Number: 3082

Today's topics:
        Building Problem Perl-5.6.0 biju.arjunan@wipro.com
        CGI programmer needed for custom script landson@writeme.com
    Re: credit card validation.....isn't working <phill@modulus.com.au>
    Re: deleting from a hash by reference... (Andrews)
    Re: determining existence of object method <uri@sysarch.com>
    Re: help - undef $/; ? (Tad McClellan)
    Re: Large hash handling (Ilya Zakharevich)
        Namespace question <notacceptingspam@nowhere.can>
    Re: Namespace question <makarand_kulkarni@My-Deja.com>
    Re: NDBM Permission error?? <phill@modulus.com.au>
    Re: NDBM Permission error?? <ksoares@beancreative.com>
        Numbers module to normalize numbers and/or smooth curve <bray@virtualcreations.net>
        Perl-5.06 Build Error bijua@my-deja.com
    Re: regex mind bender (for me) (Ilya Zakharevich)
    Re: regex mind bender (for me) (Andrew Johnson)
    Re: Shopping cart problems <sales@gboworld.com>
    Re: Shopping cart problems (Reo M.)
    Re: They won't allow perl! <hal9000@zonnet.nl>
    Re: They won't allow perl! <jbabbington@pobox.com>
    Re: using an array from the disk <hal9000@zonnet.nl>
    Re: zen and the art of trolling [OT] <dan@tuatha.sidhe.org>
    Re: zen and the art of trolling [OT] <godzilla@stomp.stomp.tokyo>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 18 May 2000 03:10:51 GMT
From: biju.arjunan@wipro.com
Subject: Building Problem Perl-5.6.0
Message-Id: <8fvmvg$qat$1@nnrp1.deja.com>

*,

I got the documentaiton from ur URL but failed to get Thread.pm
module.

I downloaded Perl-5.6.0 and trying to install with thread facility.

but I am failing to make

the Error is given below

`sh  cflags libperl.a miniperlmain.o`  miniperlmain.c
          CCCMD =  /tools/gcc/bin/gcc -DPERL_CORE -c -D_HPUX_SOURCE
-L/lib/pa1.1 -DUINT32_MAX_BROKEN
-DPTHREAD_H_FIRST -I/usr/local/include -O
        `sh  cflags libperl.a perl.o`  perl.c
          CCCMD =  /tools/gcc/bin/gcc -DPERL_CORE -c -D_HPUX_SOURCE
-L/lib/pa1.1 -DUINT32_MAX_BROKEN
-DPTHREAD_H_FIRST -I/usr/local/include -O
perl.c: In function `perl_construct':
perl.c:169: incompatible type for argument 2 of `pthread_mutex_init'
perl.c:174: incompatible type for argument 2 of `pthread_mutex_init'
perl.c:175: incompatible type for argument 2 of `pthread_cond_init'
perl.c:176: incompatible type for argument 2 of `pthread_mutex_init'
perl.c:177: incompatible type for argument 2 of `pthread_cond_init'
perl.c:179: incompatible type for argument 2 of `pthread_mutex_init'
perl.c:182: incompatible type for argument 2 of `pthread_mutex_init'
perl.c: In function `perl_destruct':
perl.c:300: too few arguments to function `pthread_getspecific'
perl.c:347: incompatible type for argument 1 of `pthread_detach'
perl.c: In function `perl_parse':
perl.c:802: too few arguments to function `pthread_getspecific'
perl.c: In function `S_parse_body':
perl.c:1212: incompatible type for argument 2 of `pthread_mutex_init'
perl.c: In function `perl_run':
perl.c:1307: too few arguments to function `pthread_getspecific'
perl.c: In function `S_init_main_stash':
perl.c:2400: incompatible type for argument 2 of `pthread_mutex_init'
perl.c: In function `S_init_main_thread':
perl.c:3446: incompatible type for argument 2 of `pthread_mutex_init'
*** Error exit code 1


PS:= I am able to install the same without therad feature ..

Please help me out

Regards,

Biju A



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


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

Date: Thu, 18 May 2000 03:14:40 GMT
From: landson@writeme.com
Subject: CGI programmer needed for custom script
Message-Id: <8fvn6k$qqc$1@nnrp1.deja.com>

I would like to hire a cgi programmer to create what should be a simple
custom script for a website. Anyone interested, please contact me at
landson@writeme.com

Ma


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


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

Date: Thu, 18 May 2000 12:23:07 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: credit card validation.....isn't working
Message-Id: <3923540A.762@modulus.com.au>

babylon93 wrote:
> 
> Hello,
> 
> I'm doing a flash e-commerce site ( http://www.cowboypottery.com ) and
> decided I should have some kind of credit card number verification, since
> the cards aren't being processed real-time.  I have been working with
> something I thought would work for 16-digit card numbers, but it doesn't
> really do that well.........
> 
> I have converted it into actionscript for Flash, and it just doesn't make
> any sense, now, why it would work.  First the perl I'm speaking of....
> 
> # 16 digit card numbers
> sub card16 {
>     $cc0 = substr($cardnumber,0,1);
>     $cc1 = substr($cardnumber,1,1);
>     $cc2 = substr($cardnumber,2,1);
>     $cc3 = substr($cardnumber,3,1);
>     $cc4 = substr($cardnumber,4,1);
>     $cc5 = substr($cardnumber,5,1);
>     $cc6 = substr($cardnumber,6,1);
>     $cc7 = substr($cardnumber,7,1);
>     $cc8 = substr($cardnumber,8,1);
>     $cc9 = substr($cardnumber,9,1);
>     $cc10 = substr($cardnumber,10,1);
>     $cc11 = substr($cardnumber,11,1);
>     $cc12 = substr($cardnumber,12,1);
>     $cc13 = substr($cardnumber,13,1);
>     $cc14 = substr($cardnumber,14,1);
>     $cc15 = substr($cardnumber,15,1);
> 
>     $cc0a = $cc0 * 2;
>     $cc2a = $cc2 * 2;
>     $cc4a = $cc4 * 2;
>     $cc6a = $cc6 * 2;
>     $cc8a = $cc8 * 2;
>     $cc10a = $cc10 * 2;
>     $cc12a = $cc12 * 2;
>     $cc14a = $cc14 * 2;
> 
>     if ($cc0a >= 10) {
>  $cc0b = substr($cc0a,0,1);
>  $cc0c = substr($cc0a,1,1);
>  $cc0 = $cc0b+$cc0c;
>     } else {
>  $cc0 = $cc0a;
>     }
>     if ($cc2a >= 10) {
>  $cc2b = substr($cc2a,0,1);
>  $cc2c = substr($cc2a,1,1);
>  $cc2 = $cc2b+$cc2c;
>     } else {
>  $cc2 = $cc2a;
>     }
>     if ($cc4a >= 10) {
>  $cc4b = substr($cc4a,0,1);
>  $cc4c = substr($cc4a,1,1);
>  $cc4 = $cc4b+$cc4c;
>     } else {
>  $cc4 = $cc4a;
>     }
>     if ($cc6a >= 10) {
>  $cc6b = substr($cc6a,0,1);
>  $cc6c = substr($cc6a,1,1);
>  $cc6 = $cc6b+$cc6c;
>     } else {
>  $cc6 = $cc6a;
>     }
>     if ($cc8a >= 10) {
>  $cc8b = substr($cc8a,0,1);
>  $cc8c = substr($cc8a,1,1);
>  $cc8 = $cc8b+$cc8c;
>     } else {
>  $cc8 = $cc8a;
>     }
>     if ($cc10a >= 10) {
>  $cc10b = substr($cc10a,0,1);
>  $cc10c = substr($cc10a,1,1);
>  $cc10 = $cc10b+$cc10c;
>     } else {
>  $cc10 = $cc10a;
>     }
>     if ($cc12a >= 10) {
>  $cc12b = substr($cc12a,0,1);
>  $cc12c = substr($cc12a,1,1);
>  $cc12 = $cc12b+$cc12c;
>     } else {
>  $cc12 = $cc12a;
>     }
>     if ($cc14a >= 10) {
>  $cc14b = substr($cc14a,0,1);
>  $cc14c = substr($cc14a,1,1);
>  $cc14 = $cc14b+$cc14c;
>     } else {
>  $cc14 = $cc14a;
>     }
> 
>     $val =
> $cc0+$cc1+$cc2+$cc3+$cc4+$cc5+$cc6+$cc7+$cc8+$cc9+$cc10+$cc11+$cc12+$cc13+$c
> c14+$cc15;
>     if (substr($val,1,1) !=0 ) {
>  &invalid_cc;
>     }
> }
> 
> now for the actionscript replacement:
> 
> On (Release, Key: <Enter>)
>       Set Variable: "i" = "1"
>       Loop While (i <= 16)
>             Set Variable: "cc"&i = ""
>             Set Variable: "cc"&i&"a" = ""
>             Set Variable: "cc"&i&"b" = ""
>             Set Variable: "cc"&i&"c" = ""
>             Set Variable: "cc"&i&"d" = ""
>             Set Variable: "i" = i +1
>       End Loop
>       If (Length (cardnumber) = 16)
>             Set Variable: "i" = "1"
>             Loop While (i <= 16)
>                   Set Variable: "q" = i - 1
>                   Set Variable: "cc"&i = Substring ( cardnumber, i, 1 )
>                   Set Variable: "i" = i +1
>             End Loop
>             Comment: getting "key numbers"
>             Set Variable: "i" = 1
>             Loop While (i <= 17)
>                   Set Variable: "cc"&i&"a" = (Eval ("cc"&i)) * 2
>                   Set Variable: "i" = i + 2
>             End Loop
>             Set Variable: "i" = "1"
>             Loop While (i <= 17)
>                   If (Eval ("cc"&i&"a") >= 10)
>                         Set Variable: "cc"&i&"b" = Substring ( Eval
> ("cc"&i&"a"), 0, 1 )
>                         Set Variable: "cc"&i&"c" = Substring ( Eval
> ("cc"&i&"a"), 2, 1 )
>                         Set Variable: "temp1" = Eval ("cc"&i&"b")
>                         Set Variable: "temp2" = Eval ("cc"&i&"c")
>                         Set Variable: "cc"&i&"d" = temp1 + temp2
>                   Else If (Eval ("cc"&i&"a") < 10)
>                         Set Variable: "cc"&i&"d" = Eval ("cc"&i&"a")
>                   End If
>                   Set Variable: "i" = i + 1
>             End Loop
>             Set Variable: "valid" = cc1d + cc2d + cc3d + cc4d + cc5d + cc6d
> + cc7d + cc8d + cc9d + cc10d + cc11d + cc12d + cc13d + cc14d + cc15d + cc16d
>       End If
> End On
> 
> you can check out the actionscript above in action at
> http://www.ariannaoils.com/media/test/validator2.html if you have the flash
> plugin installed.

This returns 22 for the known valid card number 4111 1111 1111 1111.
As far as I can see from the above, this would be considered
"incorrect", which is, indeed, incorrect.

> 
> Thanks!
> http://www.ariannaoils.com/media

The perl subroutine below is, AFAIK, correct in validating cc #s to 19
digits. Also, in several places in the 'orrible Flash actionscript you
Set Variable: "i" = "1"
where surely you mean to
Set Variable: "i" = 1
As Flash documentation is 'orribly lacking in precision, this may or may
not be of some importance.

Are you sure that you want to mix an 'orribly documented 'orribly
implemented pseudo-scripting language like actionscript with something
reasonably important like checking a credit card number?

sub lib_isCreditCard{
  # Encoding only works on cards with less than 19 digits
  my($st) = @_;
  if (length($st) > 19){
    return -1;
  }
  my $sum = 0; 
  my $mul = 1; 
  my $l = length($st);
  for ($i = 0; $i < $l; $i++) {
  	#n.b. differences between Javascript and Perl substring
    $digit = substr($st,$l-$i-1,1);
    $tproduct = $digit*$mul;
    if ($tproduct >= 10){
      $sum += ($tproduct % 10) + 1;
    }
    else{
      $sum += $tproduct;
    }
    if ($mul == 1){
      $mul++;
    }
    else{
      $mul--;
    }
  }
  if (($sum % 10) == 0){
    return 1;
  }
  else{
    return 0;
  }
} 
__END__
hth.
-- 
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/


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

Date: 17 May 2000 18:53:14 -0700
From: gerg@ncal.verio.com (Andrews)
Subject: Re: deleting from a hash by reference...
Message-Id: <8fviea$l6c$1@ncal.verio.com>

stdenton@my-deja.com writes:
>
>IMHO, he is prematurely optimizing for space, but OTOH he knows the
>data better than I.  Anyway, one of my suggestions is to take the 32-
>bit CRC of the message text and use that as the hash key, tossing the
>message.  The number of potential messages is well less that 4G, so
>collisions shouldn't be much of a problem.  MD-5 would reduce the
>chances of a collision by a lot, but I suspect that a cryptographically
>secure hash would take so lot to compute that he couldn't keep up with
>the incoming data.
>

I would suggest you test your theory about the uniqueness of
32-bit CRCs in the data sets seen by this script.

I have doubts that 32-bit CRCs are unique enough, particularly
if the message texts are larger than 1024 bytes and/or the hash
stores tens- or hundreds of thousands of messages.  Test and see
how many CRC collisions you get in your typical data sets.

You might be surprised.


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


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

Date: Thu, 18 May 2000 03:58:57 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: determining existence of object method
Message-Id: <x7ln18h5kw.fsf@home.sysarch.com>

>>>>> "JLC" == Julian L Cardarelli <jc@juliancardarelli.com> writes:

  JLC> my $refval = ref(\&{$object->sub}) Actually, I can't remember how

  JLC> to suppress the actual running of the code but ref will return
  JLC> 'CODE' which will tell you if the method exists.  If you can find
  JLC> out how to suppress the running of the code, you're on your way.
  JLC> Just let me know how you did it to refresh my memory.

why post answers which don't actually solve the problem? what if the
method is inherited from another package? the correct answer of can has
been posted a couple of times already. you should leanr it yourself
instead of your way.

and again comp.lang.perl is a dead group.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Wed, 17 May 2000 21:04:32 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: help - undef $/; ?
Message-Id: <slrn8i6gd0.30l.tadmc@magna.metronet.com>

On Wed, 17 May 2000 22:08:39 +0100, Nadja Herkova <spam-abuse@uk2.net> wrote:

>could someone explain the function of the command
>undef $/;


Perl's special variables are documented in perlvar.pod:

   perldoc perlvar

     "undef to read through the end of file"

So my guess is that it reads through the end of file  :-)



>open (LIST, "$basedir$list");


You should always, yes *always*, check the return value from open():

   open (LIST, "$basedir$list") || die "could not open '$basedir$list'  $!";


>but I can't find an explanation of the undef command that I understand
>wholly


Which implies that you _did_ find an explanation but didn't understand it.

Please let us know which one you are referring to so it can
be made more clear.


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 18 May 2000 01:24:59 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Large hash handling
Message-Id: <8fvgpb$n0a$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Thomas Rock 
<thomas@x-tekcorp.com>],
who wrote in article <MPG.138ce8cf3db628439896bb@news.anet-chi.com>:
> First, is it possible for the OS (Unix or Windows) to use
> swap space to hold part of the hash, or must it all be 
> contained in memory?

If you need to ask your OS to do this, it is not an OS.

Ilya


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

Date: Thu, 18 May 2000 01:08:26 GMT
From: "Jim Stout" <notacceptingspam@nowhere.can>
Subject: Namespace question
Message-Id: <eoHU4.1129$H47.16178@newsread1.prod.itd.earthlink.net>

Hello,

I'm somewhat of a Perl rookie with a question regarding namespaces and
subroutine/function call semantics when using the 'package' declaration.
Note that I'm am not referring to Perl modules here, just subroutines
inside packages. If I have the following:

package foo;
sub bar{
does whatever;
}

I "require" the package 'foo' elsewhere. I know to access variables in
foo I need to qualify them - that is,

$something = $foo::variable;.

Are the same semantics required to call a subroutine in a package? That
is, should subroutine 'bar' be called as,

&foo::bar();

or as,

&bar();

or are both correct.

Any help appreciated. The manuals aren't clear to me on this.

Thanks.




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

Date: Wed, 17 May 2000 18:42:08 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Namespace question
Message-Id: <39234A70.BFBE9300@My-Deja.com>

> Are the same semantics required to call a subroutine in a package? That
> is, should subroutine 'bar' be called as,

check
perldoc Exporter;




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

Date: Thu, 18 May 2000 12:56:18 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: NDBM Permission error??
Message-Id: <39235BD2.4492@modulus.com.au>

Keith Soares wrote:
> 
> I am trying to work with an NDBM database, but I keep getting an error.
> Since the database does not exist, I have coded it to create a new
> database -- so why would it not allow access?
> No new files exist in the 'cgi-bin' directory, so I am assuming it is not
> really making the database for some reason.
> 
> Here's the code I am using:
> ---------------------------------------------
> use NDBM_File;
> $datafile = "maillist";
> tie(%database, 'NDBM_File', $datafile, O_RDWR | O_CREAT, 0666) or $msg =
> "Cannot tie to database $datafile: $!";
> 
> ...processing...
> 
> untie %database;
> ---------------------------------------------
> 
> Here's the error I keep getting:
> ---------------------------------------------
> Cannot tie to database maillist: Permission denied
> ---------------------------------------------
> 
> Any clues why this may be happening??
> 
> TIA
> Keith
Best guess: Your script, running as a cgi script, does not have
sufficient permission to write to the base directory, which may or may
not be cgi-bin.
Script run as cgi scripts are often run by the server with minimal
permissions, often inadequate for the task you're tackling.
You need to do two things:
1. Specify an absolute rather than relative directory, e.g.
$datafile = "/datalocation/maillist";
tie(%database, 'NDBM_File', $datafile, O_RDWR | O_CREAT, 0666) or $msg =
"Cannot tie to database $datafile: $!";
This should not be the cgi-bin directory, for security reasons.
2. Create a variant of your script which can be run from the command
line (thus obtaining your permissions) to pre-create the data files in
the new data directory and set their permissions to 0666.
hth.
-- 
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/


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

Date: Wed, 17 May 2000 23:44:18 -0400
From: "Keith Soares" <ksoares@beancreative.com>
Subject: Re: NDBM Permission error??
Message-Id: <si6pjspb8ta66@corp.supernews.com>

Thank you VERY much.

I have been writing to several mail lists/newsgroups for this answer and no
one has replied -- maybe my case was too simple to bother with; I don't
know.

I had actually given up hope on getting any answer from a mail list or
newsgroup. Thanks for your insight.

In any event, I thank you very much for responding and I will try your
suggestions.
K.

--

---
Keith Soares
Creative Director
B e a n  C r e a t i v e  Funktional Web Design
703 684 5945
fx 703 684 5068
http://www.beancreative.com
ksoares@beancreative.com

---
Peter Hill <phill@modulus.com.au> wrote in message
news:39235BD2.4492@modulus.com.au...
> Keith Soares wrote:
> >
> > I am trying to work with an NDBM database, but I keep getting an error.
> > Since the database does not exist, I have coded it to create a new
> > database -- so why would it not allow access?
> > No new files exist in the 'cgi-bin' directory, so I am assuming it is
not
> > really making the database for some reason.
> >
> > Here's the code I am using:
> > ---------------------------------------------
> > use NDBM_File;
> > $datafile = "maillist";
> > tie(%database, 'NDBM_File', $datafile, O_RDWR | O_CREAT, 0666) or $msg =
> > "Cannot tie to database $datafile: $!";
> >
> > ...processing...
> >
> > untie %database;
> > ---------------------------------------------
> >
> > Here's the error I keep getting:
> > ---------------------------------------------
> > Cannot tie to database maillist: Permission denied
> > ---------------------------------------------
> >
> > Any clues why this may be happening??
> >
> > TIA
> > Keith
> Best guess: Your script, running as a cgi script, does not have
> sufficient permission to write to the base directory, which may or may
> not be cgi-bin.
> Script run as cgi scripts are often run by the server with minimal
> permissions, often inadequate for the task you're tackling.
> You need to do two things:
> 1. Specify an absolute rather than relative directory, e.g.
> $datafile = "/datalocation/maillist";
> tie(%database, 'NDBM_File', $datafile, O_RDWR | O_CREAT, 0666) or $msg =
> "Cannot tie to database $datafile: $!";
> This should not be the cgi-bin directory, for security reasons.
> 2. Create a variant of your script which can be run from the command
> line (thus obtaining your permissions) to pre-create the data files in
> the new data directory and set their permissions to 0666.
> hth.
> --
> Peter Hill,
> Modulus Pty. Ltd.,
> http://www.modulus.com.au/
>




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

Date: Thu, 18 May 2000 00:00:55 -0400
From: "Bray Jones" <bray@virtualcreations.net>
Subject: Numbers module to normalize numbers and/or smooth curves?
Message-Id: <8fvphr$d36$1@news3.infoave.net>

I have a large array of numbers that when graphed, looks very "jagged".
Meaning I can have considerable differences in two numbers all through the
graph making the lines take sharp turns up and down in short time frames.

Are there any modules to take those numbers and normalize them before I
graph them to make a smoother curve in the graph?

I've looked in CPAN, but haven't found anything that looks helpful.

Any help would be appreciated.  Thanks...

--

Bray Jones




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

Date: Thu, 18 May 2000 03:07:28 GMT
From: bijua@my-deja.com
Subject: Perl-5.06 Build Error
Message-Id: <8fvmp7$q75$1@nnrp1.deja.com>



Randy,

I got the documentaiton from ur URL but failed to
get Thread.pm
module.

I downloaded Perl-5.6.0 and trying to install with
thread facility.

but I am failing to make

the Error is given below

`sh  cflags libperl.a miniperlmain.o`
miniperlmain.c
          CCCMD =  /tools/gcc/bin/gcc -DPERL_CORE
-c -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-DPTHREAD_H_FIRST -I/usr/local/include -O
        `sh  cflags libperl.a perl.o`  perl.c
          CCCMD =  /tools/gcc/bin/gcc -DPERL_CORE
-c -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-DPTHREAD_H_FIRST -I/usr/local/include -O
perl.c: In function `perl_construct':
perl.c:169: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c:174: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c:175: incompatible type for argument 2 of
`pthread_cond_init'
perl.c:176: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c:177: incompatible type for argument 2 of
`pthread_cond_init'
perl.c:179: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c:182: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c: In function `perl_destruct':
perl.c:300: too few arguments to function
`pthread_getspecific'
perl.c:347: incompatible type for argument 1 of
`pthread_detach'
perl.c: In function `perl_parse':
perl.c:802: too few arguments to function
`pthread_getspecific'
perl.c: In function `S_parse_body':
perl.c:1212: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c: In function `perl_run':
perl.c:1307: too few arguments to function
`pthread_getspecific'
perl.c: In function `S_init_main_stash':
perl.c:2400: incompatible type for argument 2 of
`pthread_mutex_init'
perl.c: In function `S_init_main_thread':
perl.c:3446: incompatible type for argument 2 of
`pthread_mutex_init'
*** Error exit code 1


PS:= I am able to install the same without therad
feature ..

Please help me out

Regards,

Biju A



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


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

Date: 18 May 2000 01:23:36 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: regex mind bender (for me)
Message-Id: <8fvgmo$mvn$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Larry Rosler 
<lr@hpl.hp.com>],
who wrote in article <MPG.138cb439308b6e2b98aa96@nntp.hpl.hp.com>:
> > > and I need to check if it contains *only* spaces.
> > > 
> > > not empty,  but if it has 1 or more spaces and nothing else in it.
>     ^^^^^^^^^
> 
>           print "yay" unless !length($var) || $var =~ /[^ ]/;
> 
>           print "yay" if      length($var) && $var !~ /[^ ]/;

Eh?  Why not /^ +\z/ ?

Ilya


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

Date: Thu, 18 May 2000 03:58:16 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: regex mind bender (for me)
Message-Id: <sTJU4.14315$95.200025@news1.rdc1.mb.home.com>

> Eh?  Why not /^ +\z/ ?

I dunno .. I said the same two posts ago ... stuff happens.

andrew

-- 
Andrew L. Johnson   http://members.home.net/andrew-johnson/epwp.html
      They're not soaking, they're rusting!
          -- my wife on my dishwashing habits
      


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

Date: Thu, 18 May 2000 01:09:10 GMT
From: gboworld.com <sales@gboworld.com>
Subject: Re: Shopping cart problems
Message-Id: <8fvfrb$ime$1@nnrp1.deja.com>

We have designed a frame shopping cart,
and a window shopping cart.
if interested, please visit
http://www.gboworld.com/index.html

It is easy to use and design.

In article <EbAU4.2023$R12.39046@news.itd.umich.edu>,
  "K. Scott Vowels" <svowels@umich.edu> wrote:
> Hey all,
> *Disclaimer*  Keep the flames to a minimum, I am not a coder.
>
> A friend is developing a shopping cart function in Perl and is having
> problems getting the information on the first form to replicate onto
> upstream forms.  It appears to be clearing the session when it
refreshes in
> the next form.  Any thoughts or clues?  I realize without looking at
it, I'm
> probably asking a stupid question, but...that's never stopped me in
the
> past:)
>
> He seems pretty convinced that this is problem that has *never* been
> solved...I said, "let me ask around".
>
> Thanks in advance,
> K. Scott
> svowels@umich.edu
>
>

--
Thanks,

gboworld.com


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


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

Date: Thu, 18 May 2000 02:13:42 GMT
From: reo@infi.net (Reo M.)
Subject: Re: Shopping cart problems
Message-Id: <392331d0.10933209@news.infi.net>

On Wed, 17 May 2000 12:57:17 -0400, "K. Scott Vowels"
<svowels@umich.edu> wrote:

>Hey all,
>*Disclaimer*  Keep the flames to a minimum, I am not a coder.


I *think* i understand your problem.  And I managed to solve it w/o
resorting to cookies...

I assigned each user who clicked into the site a unique number or
identifier with a script called login.cgi.  All it did was assign the
user a unique number and spit back the first page of the shopping
cart...

there was a line in the html that was created dynamically...it was:


<INPUT TYPE=HIDDEN VALUE="$cartid">

Every time they added an item to the shopping cart (or removed, or
otherwise changed an item) the shoppingcart.cgi was invoked.  

Something like this is necessary to keep track of information from one
page to another since no cookies are being transmitted to keep track
of the user and his Cart ID

hth

Reo



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

Date: Thu, 18 May 2000 03:13:24 +0100
From: "hal9000" <hal9000@zonnet.nl>
Subject: Re: They won't allow perl!
Message-Id: <392342eb_2@excalibur.gbmtech.net>

I have used Perl for many mission critical applications for my current
employer (a
multinational distributor) and these solutions have proven to be very
reliable and
stable. Some 150MB of Plain text financial reports get processed by these
scripts
every day (the 'old' process would take more than 4 hours to complete while
the Perl
solution is ready in approximately 6 minutes). The Perl solution has been
running without
any disruption for more than 6 months while the 'old' process (and the
server) needed
to be restarted several times every week.
The high stability, flexibility and speed and portability of these processes
have allowed
these scripts to be ported to about 4 other countries where they are also
used on a
daily basis for mission critical applications

I have found out that Perl is in fact a perfect tool for Win32 platforms
(although there
are more stabile platforms to be found ;-)

hal9000

p.s. Have you ever seen the amount of resources that are being used on a
Windoze
system by just dragging a notepad window around for a while?

<<< Small step for *NIX, giant leap for PC's >>>

Frank Krul wrote in message <3922CE48.87622ADD@acc.com>...
>Hello,
>
>I also seriously think we should not install Perl on the Exodus
>machines.
>1. We do not know the stability of Perl running under NT for high volume
>sites.






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

Date: Wed, 17 May 2000 21:29:28 -0500
From: jim babbington <jbabbington@pobox.com>
Subject: Re: They won't allow perl!
Message-Id: <39235588.16F7A624@pobox.com>

> 1. We do not know the stability of Perl running under NT for high volume
>
> sites.

NT will peter out long before Perl will.

>
> 2. Perl runs out of the IIS process, every call to a perl script runs a
> separate instance of Perl. This can be resource
> intensive, and if there is something wrong with the script, it can
> potentially bring the whole server down.
>

This is less of a problem than the FUD spinners will have you think. Even
without the server pluggins (mod_per, perlex), NT does a good job of keeping
highly requested executable in nearby in cache - if your visitors are
hitting links that summon perl.exe alot, the executable will be loaded and
started quickly. But - the pluggins are there and they do help.

If something goes wrong with a script, it can bring any OS down - I've
proven this on many system :-O. The difference here is that these problems
are easier to catch on the more commercial ready OSes (Linux, OS/400,
Solaris).

The best way (IMO) to handle high volume is with lots of good hardware -
fast SCSI drive, lots of memory, and fast cpu(s). This, to some degree, is
doable with an NT machine, but if NT should get soaked, Perl can be ported
over to (Unix|vms|AS400) so your biggest investment (the code) can be
preserved no matter where the trade winds send you.  Also, look at load
balancing strategies that allow you to split the WWW load over several
machines.

>
> As an alternative, I suggest they run their Perl scripts off
> CENSORED instead. I believe the CENSORED
> team should be able to talk to CENSORED to host their Perl scripts
> there.
>
> ----------------------
>
> I have used perl for years on UNIX, but do not know of it's inherent
> weaknesses on NT.  Aby help would be appreciated.

My biggest problem when running Perl CGIs under NT when I try to contact
another server (SMTP,SQL,NNTP), and the process get's hosed when the web
user bails on the transaction (Hits stop or escape) - this causes the
perl.exe process to go zombie. I had to write a script (in perl) that runs
once an hour to finds these zombies and quietly euthanise them.

I'm currently fighting of the Perl Paranoids now so I know what your going
through - my best weapon is to use Perl to produce results quickly, and then
loaf around at the finish line to gloat as they come stumbling in.

Fight the FUD!!



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

Date: Thu, 18 May 2000 03:26:47 +0100
From: "hal9000" <hal9000@zonnet.nl>
Subject: Re: using an array from the disk
Message-Id: <392345f9_1@excalibur.gbmtech.net>

You might want to check out the 'Storable' module

hal9000

<<< Small step for *NIX, giant leap for PC's >>>

Baris wrote in message <391ef4601_1@goliath2.newsfeeds.com>...
>Hello,
>I am using a stack (array) in my program, I (shift) elements once in a
>while, but I (push) more elements to the array. The array gets bigger >and
bigger (upto 20,000+ elements) and it will become a memory >hog.





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

Date: Thu, 18 May 2000 01:38:34 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: zen and the art of trolling [OT]
Message-Id: <uQHU4.87231$hT2.367290@news1.rdc1.ct.home.com>

Andrew N. McGuire <andrew.mcguire@walgreens.com> wrote:
> Brian Landers wrote:
>> 
>> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
>> news:3922CAD1.3BF038@stomp.stomp.tokyo...
>> > I both ask and demand you desist posting
>> > commentary of a racially insulting intent.
>> 
>> Two words, *free speech* - it's called the Bill of Rights, check it out.

> I would bet that not everyone in this NG is protected by the 1st
> amendment.  Usenet is international.  Also libel and slander
> are not protected by the Bill of Rights.  Do I think that
> Godzilla has been slandered? No, but that is irrelevant, as
> she believes she has been, whether she has or not.

More importantly, the US Constitution only puts restrictions on the US
Federal Government, its agencies, and affiliated governmental units. (i.e.
US states and municipalities) It has no power to speak of over
non-governmental organizations or individuals.

So he/she/it can, in fact, demand you shut up, and the US constitution
holds no sway. (That he/she/it has no power to make you do so, nor much
legal recourse to speak of, does. This, however, is not a constitutional
issue)

Not particularly perl-related, but then none of this is.

				Dan


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

Date: Wed, 17 May 2000 19:11:15 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: zen and the art of trolling [OT]
Message-Id: <39235143.EFB59ECD@stomp.stomp.tokyo>

Dan Sugalski wrote:
> Andrew N. McGuire <andrew.mcguire@walgreens.com> wrote:
> > Brian Landers wrote:
> >> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message

> Not particularly perl-related, but then none of this is.

Would you boys mind just leaving this alone?
The author who originated those comments
directed at Mr. Xah, apologized in his own 
way and has made friendly gestures. Chances are 
good he wasn't thinking when he made those 
statements and never considered possible 
racial overtones. Give it a rest ok. We
all screw up, everyday it seems.

Pick on me about my Perl code and let
this go. Just ain't worth arguement.
An apology was given, friendship has
been offered. Don't ruin this.

Godzilla!


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

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


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