From: George Schlossnagle <[EMAIL PROTECTED]> > The last item that you pass to a perl subroutine can be a array or a > hash, but none but the last, since oerl will greedy-match your arrays > when you assign them in your subroutine. The way around this is to > pass them in by reference: > > ($rows, %results) = &Select($mytable, $where_f1, $compare1, $where_v1, > \@quick_check, \%field_values); > > sub Select { > my($db_table, $where_field, $comparison, $where_value,$fieldlist_ref, > $values_ref) = @_; > > > # To access @fieldlist > my @fieldlist = @$fieldlist_ref; > my %values = %$values_ref;
Are you aware of the fact that you just created COPIES of the array and the hash? If you want to access the fields of the originals you use $fieldlist_ref->[$index] and $values_ref->{$key} Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]