home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>Text::Wrap - line wrapping to form simple paragraphs</TITLE>
- <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
- <LINK REV="made" HREF="mailto:">
- </HEAD>
-
- <BODY>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Text::Wrap - line wrapping to form simple paragraphs</P></STRONG>
- </TD></TR>
- </TABLE>
-
- <A NAME="__index__"></A>
- <!-- INDEX BEGIN -->
-
- <UL>
-
- <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
-
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#description">DESCRIPTION</A></LI>
- <LI><A HREF="#example">EXAMPLE</A></LI>
- <LI><A HREF="#author">AUTHOR</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>Text::Wrap - line wrapping to form simple paragraphs</P>
- <P>
- <HR>
- <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
- <UL>
- <LI>Linux</LI>
- <LI>Solaris</LI>
- <LI>Windows</LI>
- </UL>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <PRE>
- use Text::Wrap</PRE>
- <PRE>
- print wrap($initial_tab, $subsequent_tab, @text);
- print fill($initial_tab, $subsequent_tab, @text);</PRE>
- <PRE>
- use Text::Wrap qw(wrap $columns $huge);</PRE>
- <PRE>
- $columns = 132;
- $huge = 'die';
- $huge = 'wrap';</PRE>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P>Text::Wrap::wrap() is a very simple paragraph formatter. It formats a
- single paragraph at a time by breaking lines at word boundaries.
- Indentation is controlled for the first line ($initial_tab) and
- all subsequent lines ($subsequent_tab) independently.</P>
- <P>Lines are wrapped at $Text::Wrap::columns columns.
- $Text::Wrap::columns should be set to the full width of your output device.</P>
- <P>When words that are longer than $columns are encountered, they
- are broken up. Previous versions of <CODE>wrap()</CODE> die()ed instead.
- To restore the old (dying) behavior, set $Text::Wrap::huge to
- 'die'.</P>
- <P>Text::Wrap::fill() is a simple multi-paragraph formatter. It formats
- each paragraph separately and then joins them together when it's done. It
- will destroy any whitespace in the original text. It breaks text into
- paragraphs by looking for whitespace after a newline. In other respects
- it acts like wrap().</P>
- <P>
- <HR>
- <H1><A NAME="example">EXAMPLE</A></H1>
- <PRE>
- print wrap("\t","","This is a bit of text that forms
- a normal book-style paragraph");</PRE>
- <P>
- <HR>
- <H1><A NAME="author">AUTHOR</A></H1>
- <P>David Muir Sharnoff <<A HREF="mailto:muir@idiom.com">muir@idiom.com</A>> with help from Tim Pierce and
- many many others.</P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Text::Wrap - line wrapping to form simple paragraphs</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-