perl -pe 'goto LINE if /^2nd/' myfile