our @ofs = (0); push @ofs, pos while $string =~ /(\n)/g;