my $el; while ($el = pop @els) { # Body of loop }