in reply to Is "ref $date eq 'ARRAY'" wrong?

Others have addressed the main question. I just wanted to comment that it always strikes me as clunky to assign something to itself. Useless use of the ternary operator, you might call it.

Instead of A = test ? A : B, simply A = B unless test. Or test and A=B, if brevity is your thing. (Personally, I also favor and when I'm doing a sequence of steps vs. building a single expression with &&.)


The PerlMonk tr/// Advocate