Help for this page

Select Code to Download


  1. or download this
    our @ofs = (0);
    push @ofs, pos while $string =~ /(\n)/g;
    
  2. or download this
    sub ofs2line {
        my $offset = shift;
    ...
            return ($_, $offset-$ofs[$_-1]) if $offset < $ofs[$_];
        }
        return ();