Chris Fuchs <[EMAIL PROTECTED]> said something to this effect on 07/11/2001:
> #!/usr/local/bin/perl
> #randsig.pl, by Don Blaheta. Released into public domain, blah, blah, blah.
> # Generates a signature randomly from a single file of witty quotes which
> # the user maintains; the quotes can be multi-line, and are separated by
> # blank lines.
This is too much work. Try this:
#!/usr/bin/perl
my $fortunes = "$ENV{HOME}/.randsig";
my $fortfile = "$ENV{HOME}/.sig"
my $fortune;
my @f = do {
local *F;
local $/ = "\n\n";
open F, $fortunes or die $!;
<F>;
}
chomp($fortune = $f[rand @f])
{
local *F;
open F, ">$fortfile" or die $!;
print F $fortune;
}
# END
(darren)
--
More than any other time in history, mankind faces a crossroads. One
path leads to despair and utter hopelessness. The other, to total
extinction. Let us pray we have the wisdom to choose correctly.
-- Woody Allen