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 <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
> http://learn.perl.org/

Jim Gibson
[email protected]

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to