in reply to Help with Perl Script

You didn't say what part of it your team is having difficulty understanding, so here's a basic rundown of what is going on:

sub get_abandonned($) { # Subroutine de +finition. my $dnis = shift; # $dnis will ho +ld # the parameter +. my $total = 0; # $total holds +0. for my $key(keys %all_calls) { # There is a ha +sh named # %all_calls. +Iterate # over the keys + of the # hash and assi +gn each # key to $key o +n its # respective it +eration. next if ($key =~ /duplicate/); # Proceed to ne +xt # iteration if +the # current key c +ontains # the text 'dup +licate'. if( # If all of the # following are + true: $all_calls{$key}->[DNIS] eq $dnis && $all_calls{$key}->[SPEECH] == 0 && $all_calls{$key}->[TRANSFER] eq "hungup" ) { # then do the f +ollowing: my $time_length # Give a value +to # time_length, = &get_call_length($all_calls{$key}->[TIME]); # from this fun +ction # call. if($time_length <= -29) { # Now if this i +s true... $total++; # increment $to +tal. } } } # Move on to ne +xt key. return $total; # return the $t +otal. }

Dave