Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Reading Text Lines

by CountOrlok (Friar)
on May 11, 2006 at 16:06 UTC ( #548751=note: print w/replies, xml ) Need Help??


in reply to Reading Text Lines

Your post isn't clear about how the user can choose which 100 lines to see. The following will show a specific 100 lines from the file:
my $first_line_to_show = 427; open VIEWFILE, "< $path" or die "Can't open $path: $!<br>\n"; while( my $v_file = <VIEWFILE>) { next if $. < $first_line_to_show - 1; last if $. >= $first_line_to_show + 100; print "<div STYLE=\"font-family: 8pt Courier, 'Courier New', monos +pace; font-size: .6em;\">$v_file</div><br>"; } close VIEWFILE;
-imran

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://548751]
help
Chatterbox?
[Discipulus]: [OT] if i have an svg image (a map of italian provinces) like this one in which way i need to interact with it to have a geochart?
[Corion]: I haven't found a good way to plot stuff into country maps... Maybe one of the demos of D3.js has something usable?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2017-03-23 09:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (285 votes). Check out past polls.