in reply to Re: xml - empty node
in thread xml - empty node

length() isn't needed here since $foo is the result of $_->to_literal which returns either a string an empty string.

Replies are listed 'Best First'.
Re^3: xml - empty node
by Anonymous Monk on Apr 24, 2013 at 14:59 UTC

    length() isn't needed here

    sure it is, it clarifies intent

      Then this is even clearer. :)

      if (length $artist > 0){ print "$artist | "; } else { print "0 | "; }