#!/usr/bin/perl die "Usage: before " unless $ARGV[0]; $start = $ARGV[0]; # Filter that trims lines before regexp # skip the initial part while () { last if /$start/; } # print the good bit while () { print; } exit 0;