Read Line And Selected Subsequent Lines

B

Bob Walton

sc0ri0n said:
I was looking for this and I saw Perl Gurl's code in
http://www.purlgurl.net/~purlgurl/perl/file/read_1.html

I've 2 questions ...

1-) why does "$line_1 = ;" work and print the next line?


That's because that's not what the line really says. Check out the HTML
source and see why you should ignore crap from PG (it forgot to quote
its source code when it made HTML out of it).

2-) Is it possible to go back and read the previous 3 lines too?


Sure. Check out

perldoc -f seek

and

perldoc -f tell

But why would one want to do that, when one has already read them to get
to where one is (assuming normal variable-lenght text sorts of lines) --
one could just hang on to them.


....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top