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

I have to admit being excited about this construct the first time I saw it, though I don't know if I've ever really used it....
push(@{ $whichone ? \@arr1 : \@arr2 }, $element);

-Blake

Replies are listed 'Best First'.
Re^4: variable set to 0 ? 0 : 1
by Aristotle (Chancellor) on Sep 08, 2002 at 05:18 UTC
    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.