in reply to Re: Html::Element, search for unnested elements. This works, but I don't like the test...
in thread Html::Element, search for unnested elements. This works, but I don't like the test...
#!/usr/bin/perl use strict; use warnings; my @asdf = (); print "hi\n" if ($#asdf); print "howdy\n" if (scalar @asdf); print "hola\n" if ($asdf[0]); print "---\n"; @asdf = ('a'); print "hi\n" if ($#asdf); print "howdy\n" if (scalar @asdf); print "hola\n" if ($asdf[0]); print "---\n"; @asdf = ('','a'); print "hi\n" if ($#asdf); print "howdy\n" if (scalar @asdf); print "hola\n" if ($asdf[0]); __END__ Output: hi --- howdy hola --- hi howdy
|
|---|