[Gllug] ascii box drawing program

Daniel P. Berrange dan at berrange.com
Tue Mar 9 12:29:38 UTC 2004


On Tue, Mar 09, 2004 at 12:17:06PM +0000, Ben Fitzgerald wrote:
> Hi all
> 
> quick question:
> 
> +-----------------------------------------------+
> | name an ascii box drawing program that outputs|
> | stuff like this? I saw one a while back - now |
> | I can't recall the name!                      |
> +-----------------------------------------------+
> 
> A sort of figlet for text diagrams?

Perl....

http://dev.perl.org/perl6/exegesis/E07.html

Yes, that page is about perl 6, but the examples in there
show how it works in perl 5 too.

<example>
   our ($name, $age, $ID, $comments); 
   
   format STDOUT
    =================================== 
   | NAME     |    AGE     | ID NUMBER |
   |----------+------------+-----------|
   | @<<<<<<< | @||||||||| | @>>>>>>>> |
      $name,     $age,        $ID,
   |===================================|
   | COMMENTS                          |
   |-----------------------------------|
   | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |~~
    $comments,
    ===================================
   .

   write STDOUT;
</example>

Dan.
-- 
|=-               http://www.berrange.com/~dan/gpgkey.txt             -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20040309/e5d1e873/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list