Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: $. - smarter than you might thinkby GrandFather (Saint) |
on Jun 22, 2006 at 22:53 UTC ( [id://557036]=note: print w/replies, xml ) | Need Help?? |
Ohh, that's nice, if you expect it. :) So you can have a Perl script print itself by:
so long as __END__ or __DATA__ are present. Of course that also means that you have to my $dataStart = tell DATA; if you want to seek DATA back to the data start rather than script start. DWIM is Perl's answer to Gödel
In Section
Meditations
|
|