[copying to the list for the record]
on Wed, 20 Nov 2002 01:01:03AM -0500, Stephen Gran insinuated:
> perl is making my head hurt right about now. I've poked at what you
> suggested, and it doesn't quite work.
right, too bad i forgot to check it out before i sent it ... here's
the correct version:
#!/usr/bin/perl -w
# formatted_sig.perl
# Thu Nov 21 13:44:29 EST 2002
# to make stephen gran's sig thing work
$name = "Nori Heikkinen";
$email = "<nori\@maenad.net>"; # don't forget to escape the '@'
$url = "http://www.maenad.net/";
$fortune = `fortune`;
print "here's a fortune:\n$fortune\n";
write;
format STDOUT =
+---------------------------------------------------------------------+
~ | @<<<<<<<<<<<<<<<<<<<<< | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
$name, $fortune
~ | @<<<<<<<<<<<<<<<<<<<<< | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
$email, $fortune
~ | @<<<<<<<<<<<<<<<<<<<<< | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
$url, $fortune
~~| | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
$fortune
+---------------------------------------------------------------------+
. # you need this final dot!!
the tildes should be before the @<<<<<<< lines, not the variable
lines. the sigle tildes mean "don't print if all the fields are
empty"; the double ones mean "repeat until blank." the ^s at the
fortune formatting lines just mean to wrap the words around in
paragraphs.
hth,
</nori>
--
.~. nori @ sccs.swarthmore.edu
/V\ http://www.sccs.swarthmore.edu/~nori/jnl/
// \\ @ maenad.net
/( )\ www.maenad.net
^`~'^
Attachment:
pgpET2UMri9hL.pgp
Description: PGP signature