in reply to Re^2: Empty string checking in output
in thread Empty string checking in output
... the in array @output doesn't contain anything but ... the else block is not executing ...
... because, contrary to what you think, the @output array contains something. Try printing/dumping the contents of the array. Also, what code are you actually running?
>perl -wMstrict -le "my @output = (); ;; if (@output) { print qq{true clause: array not empty}; } else { print qq{false clause: array empty}; } " false clause: array empty
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Empty string checking in output
by Kumar Mantri (Novice) on Aug 17, 2011 at 09:12 UTC | |
by AnomalousMonk (Archbishop) on Aug 17, 2011 at 13:56 UTC | |
by Kumar Mantri (Novice) on Aug 18, 2011 at 13:38 UTC | |
by AnomalousMonk (Archbishop) on Aug 18, 2011 at 17:43 UTC |