in reply to Reading Text Lines
How you keep track of $pos and pass it from page to page is up to you.# get the last $pos from somewhere my $pos = 0; open VIEWFILE, "< $path" or die "Can't open $path: $!<br>\n"; seek (VIEWFILE, $pos, 0) or die "Couldn't seek to $pos: $!<br>\n"; my $count = 100; while( defined(my $v_file = <VIEWFILE>) and $count--) { print "<div STYLE=\"font-family: 8pt Courier, 'Courier New', mon +ospace; font-size:.6em;\">$v_file</div><br>"; } # save $pos somewhere for the next page view $pos = tell(VIEWFILE); close VIEWFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading Text Lines
by ikegami (Patriarch) on May 11, 2006 at 17:48 UTC | |
|
Re^2: Reading Text Lines
by Anonymous Monk on May 11, 2006 at 17:25 UTC | |
by ruzam (Curate) on May 11, 2006 at 17:37 UTC | |
by Anonymous Monk on May 11, 2006 at 19:22 UTC | |
by ikegami (Patriarch) on May 11, 2006 at 19:25 UTC | |
by Anonymous Monk on May 11, 2006 at 17:43 UTC | |
by Anonymous Monk on May 11, 2006 at 18:27 UTC |