in reply to Fetch every other item in a list
Be warned that you cannot construct a useful function this way though because it remembers state from function call to function call!#! /usr/bin/perl (push @odd, $_)...(push @even, $_) foreach @ARGV; print map "$_\n", "Odd arguments:", (map " $_", @odd), "\nEven arguments:", (map " $_", @even);
|
|---|