2 ms·
In Perl I once saw someone write; unless predicate do this else unless impossible_thing do the impossible What it did at runtime I have no idea, b
by nonrandomstring 4y ago
In Perl I once saw someone write;
unless predicate
do this
else unless impossible_thing
do the impossible
What it did at runtime I have no idea, but it broke my brain for the
rest of the week.
- ilyt 4y agoif !cond1 do this elsif !cond2 do that ? it's literally just `!` equivalent. Honestly I haven't seen much code using unless in wild. Especially that it is literally shorter to just !
- otherflavors 4y agothere is no else unless (or even elsunless, since this isn't javascript) in Perl, might have been unless (predicate) { do_this; } else { do_the_impossible unless impossible_thing; }