If you want to process lines in a file twice, there are two simple choices:

1. Save the lines in a array the first time you read the file, then traverse 
the array as many times as you want. This works unless you have a humungous 
file.

2. Call seek(<filehandle>,0,0) on the file handle and read the file again.

> On Dec 26, 2018, at 9:40 AM, Eldon DeHart <eldondeh...@gmail.com> wrote:
> 
> I can't figure out how to read each line of text back into my program and 
> assign it to the variable again.
> Thanks for help in advance.
> Eldon
> <wbws.pl>-- 
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/

Jim Gibson
jimsgib...@gmail.com

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to