now i figure out a way to push new value which is not originally
existed in the array at the end of loop.
my $idx = 0;
for my $product ( @{$cart} ) {
$idx= ($idx+1); $idxx=($idx-1);
$product->{itemID} == $itemID or next;
$finalidx=$idx;
splice( @{$cart}, $idxx, 1, @newvalue); ## quantity has
been changed)
}
if ( $finalidx=""){ push @{ $cart }, @newvalue }
$session->param( "CART", $cart ); # store the updated cart back
into the session
return display_cart($cgi, $session); # show the contents of the
cart
}
###### cgi::session cart 4 search index
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/