Thanks to everyone who responded to my question. You guys really are a bunch of fast fingers out there. I got great examples no sooner than a blink of an eye! Can I learn how to code that fast? ;) I have more than enough material to work with. I'm going to run through each of my examples and see what best suites my task. It's nice to have options when trying to solve a problem, so thanks everyone :)
-T ----- Original Message ----- From: "Owen Cook" <[EMAIL PROTECTED]> To: "Trina Espinoza" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, January 27, 2004 7:59 PM Subject: Re: function that reads line numbers? > > On Tue, 27 Jan 2004, Trina Espinoza wrote: > > > So this may be wishful thinking, but I would be kicking myself later if I didn't ask. Is there a function in perl where you give > > the function exact line numbers and it would only read the data in the range of lines you gave it? My other alternative would be > > using a counter to find a start line and an end line in a file. Doable but painful. Let me know if there is any hope . . . > > > Possibly you are thinking of using an array ? > > @lines=<FILE>; > $Line_Wanted=$lines[Wanted_File_Number]; > > That means you put the file in an array, then read an array element, that > being the line number you want. Remember arrays start at 0; > > If you have very large files, you might have to use another strategy. > > You might also whant to look at the $. variable > > > Owen > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>