home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / demo_ws.pl < prev    next >
Encoding:
Perl Script  |  2004-06-01  |  505 b   |  24 lines

  1. #! /usr/local/bin/perl -w
  2.  
  3. use Text::Reform 'form';
  4.  
  5. $frmt = "[[[[[[[[[[[[[[[[[[[[[";
  6. $data = "h  e\t \tl lo\nworld\t\t\t\t\t";
  7.  
  8. print +form $frmt, $data;
  9. print "==========\n";
  10.  
  11. print +form {squeeze=>1}, $frmt, $data;
  12. print "==========\n";
  13.  
  14. print +form {fill=>1}, $frmt, $data;
  15. print "==========\n";
  16.  
  17. print +form {squeeze=>1, fill=>1}, $frmt, $data;
  18. print "==========\n";
  19.  
  20. print length(form "[[[[[[[[[[", "short"), "\n";
  21.  
  22. print length(form {trim=>1}, "[[[[[[[[[[", "short"), "\n";
  23.  
  24.