Help for this page

Select Code to Download


  1. or download this
     
    if (my $totalvar = $totals{ $id }) {
        $$totalvar += $amt;
    }
    
  2. or download this
     
    if( defined $total{$id} ){
         $total{$id} += $amt;
    }else{
         $total{tocredit} += $amt;
    }
    
  3. or download this
     
    my $sth = $dbh->prepare('select * from accounts where id = ?'); 
    $sth->execute($current_account_id); 
    ...
    
    # a naive way 
    my %totals = %{$hr};