... 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
In reply to Re^3: Empty string checking in output
by AnomalousMonk
in thread Empty string checking in output
by Kumar Mantri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |