Perl-Sensitive Sunglasses | |
PerlMonks |
Re^4: Multi-stage flip-flop? ( till() - proof of concept)by LanX (Saint) |
on Dec 12, 2014 at 03:00 UTC ( [id://1110117]=note: print w/replies, xml ) | Need Help?? |
Your concept of passing the condition only works when testing a global var like $_ and typechecking is vulnerable in edge cases.¹ I think my concept is more robust and any boolean test can be used. Sometimes less is more.
out
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :) ¹) What if a test returns a reference for true? Enforcing negation with a unitary minus solves this issue.
In Section
Meditations
|
|