#!/usr/bin/perl -w # Display selected split fields of input. Like awk '{print $2, $3}' but more usable. use strict; while () { my @f = split; print join(' ', map { $f[$_-1] } (@ARGV ? @ARGV : (1))), "\n"; }