in reply to Re: reading __DATA__ more than once
in thread reading __DATA__ more than once

The value sticks around because I don't create in the function, but in the scope surrounding the function. If you've got Perl 5.6, here's a cooler way to do it:
{ my $offset; CHECK { $offset = tell DATA } sub data { seek DATA, $offset, 0; [<DATA>] } }
The CHECK block happens just after compile-time ends.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;