perl -wMstrict -e "sub S1 { return int rand 2 ? ('one 1') : () } sub S2 { return int rand 2 ? ('one 2') : ('bad', 'news') } for (0 .. shift) { if (1 == (my @f = S1 || S2)) { print @f } else { print 'not one' } print qq(\n); }" 10 one 1 one 1 one 1 not one one 2 not one one 2 one 1 not one one 1 not one