The only thing I could come up with was self reproducing code like a virus
Well, it is used effectively as a comedic device in source filter joke modules - such as Acme::Bleach and Acme::Buffy.

The Acme::Bleach source is short and amusing (note the use of 0/$0 below to bleach the source file):

package Acme::Bleach; our $VERSION = '1.150'; my $tie = " \t"x8; sub whiten { local $_ = unpack "b*", pop; tr/01/ \t/; s/(.{9})/$1\n/g; + $tie.$_ } sub brighten { local $_ = pop; s/^$tie|[^ \t]//g; tr/ \t/01/; pack "b* +", $_ } sub dirty { $_[0] =~ /\S/ } sub dress { $_[0] =~ /^$tie/ } open 0 or print "Can't rebleach '$0'\n" and exit; (my $shirt = join "", <0>) =~ s/(.*)^\s*use\s+Acme::Bleach\s*;\n//sm; my $coat = $1; my $pressed = '#line ' . ("$coat\n" =~ tr/\n/\n/) . ' ' . (caller)[1] +. "\n"; local $SIG{__WARN__} = \&dirty; do {eval $coat . brighten $shirt; print STDERR $@ if $@; exit} unless dirty $shirt && not dress $shirt; open 0, ">$0" or print "Cannot bleach '$0'\n" and exit; print {0} "${coat}use Acme::Bleach;\n", whiten $pressed.$shirt and exi +t; __END__


In reply to Re^2: Is it possible to modify __DATA__ via the DATA file handle or otherwise? by eyepopslikeamosquito
in thread Is it possible to modify __DATA__ via the DATA file handle or otherwise? by YenForYang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.