3 ms·
Correction: Conway says don't use postfix unless, for, while or until So last example should be: for my $i (@list) { next if not $i % 2 == 0;
by draegtun 16y ago
Correction: Conway says don't use postfix unless, for, while or until
So last example should be:
for my $i (@list) {
next if not $i % 2 == 0;
do_something();
}
Personally I don't follow the bible to the letter :) I do use prefix & postfix unless but only with simple truth conditions like this:
unless ($this) { ... }
next unless $this;