100 characters:
print map{ if(s/\?$/? /){print STDERR;$_=<STDIN>;chop} @z=split/\|/;$z[rand@z] }map{split/\[(.+?)\]/}<>

Explanation:
Using split, transform all the lines of input into a list of "chunks"; each chunk is

For each chunk:
  1. If it ends in '?', then append a space to it, print it to STDERR, and replace it with the chomped/chopped input.
  2. Split it on '|' into an array, and select a random element from the array. If there is no '|' in the chunk, then the array contains the entire chunk in one element, and that element will always be "randomly" chosen.
Since the random selection occurs last in the map, its value is passed on to print for each chunk.

Notes:

  1. I beat my head against 101, until I s/chomp/chop/.
  2. Nothing was said about newline normalization, so I could remove the chop.
  3. In real golf, there would probably be a test case with '|' and trailing-'?' in non-bracketed text, which my program would fail to handle correctly.

Update: Forced "read all ARGV and close" with "@_=<>". This allowed me to change "<STDIN>" to "<>".
98 characters:

print map{if(s/\?$/? /){print STDERR;$_=<>;chop}@z=split/\|/;$z[rand@z +]}map{split/\[(.+?)\]/}@_=<>


In reply to Re: (Golf) Mad-Lib Generator by Util
in thread (Golf) Mad-Lib Generator by tadman

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.