in reply to trouble shooting my priority lists
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 |