10 use Text::Wrap qw(wrap $columns);
15 Text::Wrap is a very simple paragraph formatter. It formats a
16 single paragraph at a time by breaking lines at word boundries.
17 Indentation is controlled for the first line ($initial_tab) and
18 all subsquent lines ($subsequent_tab) independently. $Text::Wrap::columns
19 should be set to the full width of your output device.
23 $_ = wrap "| ", "|", $text;
27 print "not " unless /^\| Text::Wrap is/; # start is ok
30 print "not " if /^.{31,}$/m; # no line longer than 30 chars
33 print "not " unless /^\|\w/m; # other lines start with
36 print "not " unless /\bsubsquent\b/; # look for a random word
39 print "not " unless /\bdevice\./; # look for last word