in reply to self-reporting perl code: how can it be done?

write a module, so you don't have to report on the reporter-code.

open the file itself - open( 0 ) -, read, parse and report...

Cheers, Sören

Update: s/\$0/0/ ... I got it wrong, it's seldom used, sorry.

Another update, now with code that's tested, as the first should have been.
A simple Perl quine:

open ( 0 ) or die $!; while ( <0> ) { print };