After reading Fair Use When Referring to Book Answers? I dashed off an email to our friends at O'Reilly.

I would like to know what the O'Reilly position is on the re-use of co +de in your books. Specifically, I belong to an online community centered around the disc +ussion of Perl code: www.perlmonks.com, and wonder if it's acceptable use to + quote code from your Perl books as an answer to posted questions (assuming proper attr +ibution). I know that most members of perlmonks already own a majority of the Pe +rl books you publish (I have 5), so I doubt it would negatively impact sa +les. Is this fair use?

I received this response:

For you, comrade, it's fair use. Perl monks should feel free to use th +is code to answer posted questions. Frank Willison Editor-in-Chief O'Reilly & Associates

Thought you all might be interested.
Man....how cool is O'Reilly?

~monk d4vis
#!/usr/bin/fnord


In reply to The Word from O'Reilly by d4vis

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.