if (%arg) { #performed only if obj. arguments given my %_temp_hash = _return_attr_data(); #returns list of obj. attributes foreach my $argcheck (keys %arg) { next if exists $_temp_hash{"_" . $argcheck}; #checks if attribute exists croak "An invalid CD attribute given"; #if not, croaks with error } }