read perlintro and length
if( length $foo ){ print 1 } else { print 2 }
In reply to Re: xml - empty node by Anonymous Monk in thread xml - empty node by ambrill