You can't reload or open a new file using the above. Additionally, you can end up having a discrepancy whereas $self->{file} points to one file and $self->{file_handle} to another. If you want that functionality, then I would set file_handle inside get_filehandle() with appropriate logic.
In reply to Re^3: What's the right way to write a method which returns one line at a time from a file?
by bliako
in thread What's the right way to write a method which returns one line at a time from a file?
by Cody Fendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |