in reply to Split on every second character
Or still using split, you can just drop every second element from the result list:
But the solutions provided by other monks are definitely nicer.$ perl -le '@l = grep {$i++ % 2} split /(..)/, "010203040506"; print j +oin "|", @l'
In Section
Seekers of Perl Wisdom