[Moscow.pm] Как очистить массив

Andrei andrei.protasovitski на gmail.com
Чт Май 27 06:39:38 PDT 2010


27 мая 2010 г. 15:38 пользователь Andrew Shitov <andy на shitov.ru> написал:

> >  ~ % perl -le 'my @a = (-2..2); while (@a){shift @a}; print @a;'
>
> Только надо чуть поперловее:
>
> shift @a while @a;
>

shift @a while @a and die;

-- 
Andrei Protasovitski
< andrei[dot]protasovitski[at]gmail[dot]com >
Diemen, Netherlands
----------- следущая часть -----------
Вложение в формате HTML было извлечено&hellip;
URL: <http://mail.pm.org/pipermail/moscow-pm/attachments/20100527/d601e3cf/attachment.html>


Подробная информация о списке рассылки Moscow-pm