Keep It Simple, Stupid | |
PerlMonks |
Re^2: Smart enough for Smart Match??? (was "Understanding ...Given/When" )by LanX (Saint) |
on Mar 04, 2010 at 17:53 UTC ( [id://826764]=note: print w/replies, xml ) | Need Help?? |
Have a look at the last code in the OP (I updated it 10 minutes after posting) given(@array) and given(\@array) both produce the same ref in $_, but the smartmatch doesn't work as documented. While I can understand why to limit given to simple scalars I think the docs should either be updated to reflect this behaviour or it's a bug. UPDATE: you should add continues to se which clauses are true
OUTPUT
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|