Thomas Wittek wrote:
The cursor on the DATA filehandle will be wrong:133 at /usr/local/lib/perl/5.8.7/TestHandler.pm line 5. Warning: something's wrong at [..]/TestHandler.pm line 6.
I think you just need to rewind it after reading it. See the docs for seek() and tell(). Here's an example:
my $data_start = tell(DATA);
while (<DATA>) {
# do something useful
}
seek(DATA, $data_start, 0);
while (<DATA>) {
# ...
}
- Perrin
