#!/usr/bin/env perl # Keep only lines with odd first number # rok.zitko@ijs.si, June 2013 while (<>) { ($x,$y) = split; $x % 2 == 1 or next; print; }