while (<>) {last if /\|/} printf "| seen at index %d in %s\n", index($_, '|'), $_;