perl -0777 -pe's/^.*\n//' any number of files #### perl -0777 -pe's/^.*(?:\n|\z)//' any number of files