#!/usr/local/bin/perl -- use strict; use warnings; my $remove_lines_modulo = shift @ARGV; die "Cannot handle zero as an argument.\n" if 0 == $remove_lines_modulo; while ( <> ) { next if 0 == $. % $remove_lines_modulo; print; }