Or use the comma operator: while (@a and my $a = shift @a, 1) { ... }
(Updated code is in bold)
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart