in reply to How can I make a index for log?

To creating an index of line numbers is fairly easy using a hash. For this you need a unique key for each line - the line number fits the bill. To create the index, loop through reading the file and store the position of each line. For example:
while (<FH>) { push @index, tell(FH); }
$. is the current line number, and tell returns the offset. The array can now be stored using different methods, including Data::Dumper. You could use a hash instead if you wanted to use a key other than the line-number.