in reply to Tree Data Structure

G'day code-ninja,

Use the defined function instead of attempting a numeric comparison. Here's some examples:

$ perl -Mwarnings -le 'my $x; print 1 if $x == undef' Use of uninitialized value in numeric eq (==) at -e line 1. Use of uninitialized value $x in numeric eq (==) at -e line 1. 1
$ perl -Mwarnings -le 'my $x; print 1 if defined $x'
$ perl -Mwarnings -le 'my $x; print 1 if ! defined $x' 1

-- Ken