#!/usr/bin/perl while (){ chomp; if ($. == 1) { print "'$_' matched\n"; } }