in reply to Re3: variable set to 0 ? 0 : 1
in thread variable set to 0 ? 0 : 1

Oh, I use that quite frequently: push @{ -d "$dir/$_" ? \@dir : \@file }, $_ for readdir DIR; It's pretty much the only use I have for it, but it's a perfect match for that.

Makeshifts last the longest.