Re: Associative Arrays problem

1999-12-09 Thread Tim Tompkins
[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 08, 1999 11:11 AM Subject: Re: Associative Arrays problem > Since the broken code worked in regular perl (and it was supposed to work> because $rech and %rech are different things) and it didn't want to work> in

Re: Associative Arrays problem

1999-12-08 Thread Ken Williams
One thing we should be clear about: mod_perl is EXACTLY regular Perl. There are no differences in how the Perl code is interpreted. The interpreter is not crippled or modified, it just processes Perl like it usually does. The only difference is that your code may be run several times in a row,

Re: Associative Arrays problem

1999-12-08 Thread Andrei A. Voropaev
Since the broken code worked in regular perl (and it was supposed to work because $rech and %rech are different things) and it didn't want to work in emb perl then there must be something strange about it. Was it an error in testing code (ie. checking $rech->{keys} instead of $rech{keys} at the

Re: Associative Arrays problem

1999-12-08 Thread Tim Tompkins
$rech is a hashref, not a hash. de-reference it with arrow notation. %toto = ( "001" => 1, "002" => 2, "003" => 3 ); %tato = ( "004"=> 4, "002"=> 5, "005"=> 6 ); $rech = {}; $nb = 2; for $mot (keys %toto) { $rech->{$mot} = 1; } for $mot (keys %tato) { if (defined $rech->{$mot}) { $rech->{$mot}

Re: Associative Arrays problem

1999-12-07 Thread Randal L. Schwartz
> "Cédric" == Cédric Avena <[EMAIL PROTECTED]> writes: Cédric> An extract of my program: Cédric> %toto = ( "001" => 1, "002" => 2, "003" => 3 ); Cédric> %tato = ( "004"=> 4, "002"=> 5, "005"=> 6 ); Cédric> $rech = {}; This $rech variable is unused in the rest of your code. "use strict" is y

Re: Associative Arrays problem

1999-12-07 Thread Joshua Chamas
Cédric Avena wrote: > > Hi, > > I'm using associative arrays in ASP 0.16, but it doesn't work... I have > taken the same portion of code in a .pl file and execute it, it works... > > Do associative arrays work with modperl ? Could anybody help me ? > > An extract of my program: > %toto = ( "00