File: demo_simple.pl

package info (click to toggle)
libtext-reform-perl 1.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 188 kB
  • ctags: 31
  • sloc: perl: 1,251; makefile: 39
file content (32 lines) | stat: -rw-r--r-- 906 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /usr/bin/perl -w

use Text::Reform;

my @name  = (qw(foo foo2 foo3)) x 20;
my @last  = (qw(bar bar2 bar3)) x 20;
my @count = (qw( 3   4    5  )) x 20;

print form
"--------------------------------------------------",
"NAME        LAST                 COUNT",
"--------------------------------------------------",
"[[[[[[[[[   [[[[[[[[[[[[[[[[[[   |||||",
 \@name,     \@last,              \@count;


print form
{ header =>
	"--------------------------------------------------\n" .
	"NAME        LAST                 COUNT\n" .
	"--------------------------------------------------",
  footer => sub {
	my ($pagenum, $lastpage) = @_;
	return "\n\n\nEND OF REPORT" if $lastpage;
	form "\n\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
             ".../".($_[0]+1);
  },
  pagelen=>20,
  pagefeed=>"\n\n".("_"x60)."\n\n",
},
"[[[[[[[[[   [[[[[[[[[[[[[[[[[[   |||||",
\@name,  \@last,    \@count;