in reply to trouble shooting my priority lists

For sure the sorts don't mess around with your hashes, they merely peek into it and produce a sorted list of keys.

However the sub check_around is probably not doing what you intended it to do. It will always return the same value as what $doc brings. The variable @doc_block is not declared and therefore its values are undef.
Update:$doc_block[1] is always undef (you shift the array if the number of elements>1 elsewhere in your code).

sub check_around{ #my $self = shift; my ($doc,$switcher) = @_; if ($doc_block[0] eq $doc || $doc_block[1] eq $doc){ return undef; } else { return $doc; } }

NB: use warnings would have signalled the issue and it would have saved you time.

Replies are listed 'Best First'.
Re^2: trouble shooting my priority lists
by arcnon (Monk) on Jun 15, 2007 at 12:39 UTC
    yes good catch. the array should push & shift the current doctor that I use thur each itenoration so as they dont work twice in any 5 day streach. That was another trouble spot that I thought I had cut away.
    As you can tell I cut this fish to the bone abeit very sloppily.