in reply to Get even postion elements in an array
@output = grep $|--, @input;
using some magic of $| for the flipflop.
But unless you use it for a real oneliner, use some less obscure formulation of the principal shown in previous replies. ;-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Get even postion elements in an array
by Anonymous Monk on Oct 20, 2016 at 01:25 UTC |
In Section
Seekers of Perl Wisdom