File: demo_ws.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 (23 lines) | stat: -rwxr-xr-x 476 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/perl -w

use Text::Reform 'form';

$frmt = "[[[[[[[[[[[[[[[[[[[[[";
$data = "h  e\t \tl lo\nworld\t\t\t\t\t";

print +form $frmt, $data;
print "==========\n";

print +form {squeeze=>1}, $frmt, $data;
print "==========\n";

print +form {fill=>1}, $frmt, $data;
print "==========\n";

print +form {squeeze=>1, fill=>1}, $frmt, $data;
print "==========\n";

print length(form "[[[[[[[[[[", "short"), "\n";

print length(form {trim=>1}, "[[[[[[[[[[", "short"), "\n";