Hi, 

While reading the contents of a file, on a particular match, I would like to
start reading the file again from the line preceeding the match. (say, the
match occured at line #45, I would like to start the file reading from line
#44)

#1 I thought of making a copy of the filehandle(via & argument in open
function) but that also doesn't solve the purpose as both of them always
point to the same location.Am I missing something here?
#2 Other option would be to open a secondary handle to the same file and
keep it one line before the main handle but his would mean an overhead of
managing an extra handle.

Any other way to achieve this?
or 
Is option #2 the way to do it?

Regards,
Abhimanyu

PS: The script is being written in perl.

************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to