in reply to Check multiple array elements for a single condition

List::Util's all will do that.

#!/usr/bin/env perl use strict; use warnings; use List::Util 'all'; print "a yes\n" if all { $_ == 0 } (0, 0, 0); print "b no\n" unless all { $_ == 0 } (0, 1, 0);