- or download this
c:\test>perl -e"printf qq[Line %010d\n], $_ for 1 .. 25" > junk.dat
...
Line 0000000023
Line 0000000024
Line 0000000025
- or download this
c:\test>type indexFile.pl
#! perl -sw
...
21/12/2011 17:45 425 junk.dat
21/12/2011 17:46 104 junk.dat.idx
c:\test>
- or download this
c:\test>type readIndexedFile.pl
#! perl -sw
...
Expecting 23; got: Line 0000000023
Expecting 24; got: Line 0000000024
Expecting 25; got: Line 0000000025