LanX has asked for the wisdom of the Perl Monks concerning the following question:
CHECK { my $datapos = tell main::DATA; seek main::DATA,0,0; @lines =<main::DATA>; seek main::DATA, $datapos,0; } __DATA__ whatever
This works only if there is a __DATA__ line, otherwise the filehandle DATA doesn't exist.
I'm pretty sure that DATA is only an alias of anther filehandle pointing to the current code...
Any idea how to get this filehandle?
(don't want to explicitly open $0 again for reasons of complexity and performance)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
---|