print map {$i++ & 1 ? "" : "$_ "} reverse split(/ /); #### $,=" "; print grep { $i^=1 } reverse split(/ /);