home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _c5d3b947c935237deb169eb815b92101 < prev    next >
Encoding:
Text File  |  2004-06-01  |  498 b   |  23 lines

  1. #! /usr/local/bin/perl -ws
  2.  
  3. # TRY DOING *THIS* WITH format!
  4.  
  5. use Text::Reform qw(form break_with);
  6.  
  7. my $text = join "", map "line $_\n", (1..20);
  8.  
  9. @lines = form { 
  10.     pagelen=>9,
  11.     header => sub { "Page $_[0]\n"."="x50 },
  12.     footer => sub { my ($pagenum, $lastpage) = @_;
  13.             return "" if $lastpage;
  14.             return "-"x50 . "\n" . form ">"x50, "...".($pagenum+1);
  15.               },
  16.     pagefeed => "\n"x10
  17.     },
  18. "      [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\n",
  19.        \$text;
  20.  
  21. print @lines;
  22.  
  23.