Re: Text file line input referencing

2001-10-24 Thread Robert Hall
I found this in O'rielly's Perl Cookbook. Could Someone let me know if it illegal to copy like this. Hope this helps: # looking for line number $DESIRED_LINE_NUMBER $. = 0; do { $LINE = } until $. == $DESIRED_LINE_NUMBER || eof; If you are going to be doing this a lot and the file fits into m

Re: Text file line input referencing

2001-10-24 Thread Jeff 'japhy' Pinyan
On Oct 23, Shannon Murdoch said: >I've been using the while(){ command, but it's not very helpful >when I need something on line #15 or something. > >Is there any function like $linecontents = line(FILEHANDLE,15); ? Make your own. The concept uses a positional hash. The hash looks like this

Re: Text file line input referencing

2001-10-24 Thread Brett W. McCoy
On Tue, 23 Oct 2001, Shannon Murdoch wrote: > I am wondering if there is any way that I can take the contents of a > specific text file line number (I suppose it could be called a paragraph, > since a line is considered ended by a CR/LF and may contain multiple > sentences) and put them in to a v

Re: Text file line input referencing

2001-10-24 Thread Shannon Murdoch
re 4 IS the line number (not line 5). > From: [EMAIL PROTECTED] (Walter Valenti) > Newsgroups: perl.beginners > Date: Wed, 24 Oct 2001 15:03:20 +0200 > To: Shannon Murdoch <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: Text file line input referencing &

Re: Text file line input referencing

2001-10-24 Thread walter valenti
I think thath be very simply use a counter. Walter > Hi all, > > I am wondering if there is any way that I can take the contents of a > specific text file line number (I suppose it could be called a paragraph, > since a line is considered ended by a CR/LF and may contain multiple > sentences

Text file line input referencing

2001-10-24 Thread Shannon Murdoch
Hi all, I am wondering if there is any way that I can take the contents of a specific text file line number (I suppose it could be called a paragraph, since a line is considered ended by a CR/LF and may contain multiple sentences) and put them in to a variable for manipulation. I've been using t