Alas! Ken Weingold spake thus:
> I think I remember a while back someone haveing a script to take lines
> randomly from a text file to put into a custom header.  Does anyone
> have this?  Basically I want to insert into that Outhouse header
> random lines from a text file I made from the Surrealist Compliment
> Generator. :)

This is trivial to do in perl:

open "FILE", "<file.txt";

while (<FILE>)
{
  push @lines, $_;
}

print $lines[int(rand(@lines))];

(it's untested, but it probably works). Of course, you'll have to modify
it to output the appropriate email header and whatnot.

-- 
Rob 'Feztaa' Park
http://members.shaw.ca/feztaa/
--
Kiss me twice.  I'm schizophrenic.

Attachment: msg29097/pgp00000.pgp
Description: PGP signature

Reply via email to