home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _e0f4ebde3efc4b0efcb77036cd111bfa < prev    next >
Text File  |  2000-03-23  |  3KB  |  93 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Text::Wrap - line wrapping to form simple paragraphs</TITLE>
  5. <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Text::Wrap - line wrapping to form simple paragraphs</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#example">EXAMPLE</A></LI>
  26.     <LI><A HREF="#author">AUTHOR</A></LI>
  27. </UL>
  28. <!-- INDEX END -->
  29.  
  30. <HR>
  31. <P>
  32. <H1><A NAME="name">NAME</A></H1>
  33. <P>Text::Wrap - line wrapping to form simple paragraphs</P>
  34. <P>
  35. <HR>
  36. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  37. <UL>
  38. <LI>Linux</LI>
  39. <LI>Solaris</LI>
  40. <LI>Windows</LI>
  41. </UL>
  42. <HR>
  43. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  44. <PRE>
  45.         use Text::Wrap</PRE>
  46. <PRE>
  47.         print wrap($initial_tab, $subsequent_tab, @text);
  48.         print fill($initial_tab, $subsequent_tab, @text);</PRE>
  49. <PRE>
  50.         use Text::Wrap qw(wrap $columns $huge);</PRE>
  51. <PRE>
  52.         $columns = 132;
  53.         $huge = 'die';
  54.         $huge = 'wrap';</PRE>
  55. <P>
  56. <HR>
  57. <H1><A NAME="description">DESCRIPTION</A></H1>
  58. <P>Text::Wrap::wrap() is a very simple paragraph formatter.  It formats a
  59. single paragraph at a time by breaking lines at word boundaries.
  60. Indentation is controlled for the first line ($initial_tab) and
  61. all subsequent lines ($subsequent_tab) independently.</P>
  62. <P>Lines are wrapped at $Text::Wrap::columns columns.  
  63. $Text::Wrap::columns should be set to the full width of your output device.</P>
  64. <P>When words that are longer than $columns are encountered, they
  65. are broken up.  Previous versions of <CODE>wrap()</CODE> die()ed instead.
  66. To restore the old (dying) behavior, set $Text::Wrap::huge to
  67. 'die'.</P>
  68. <P>Text::Wrap::fill() is a simple multi-paragraph formatter.  It formats
  69. each paragraph separately and then joins them together when it's done.  It
  70. will destroy any whitespace in the original text.  It breaks text into
  71. paragraphs by looking for whitespace after a newline.  In other respects
  72. it acts like wrap().</P>
  73. <P>
  74. <HR>
  75. <H1><A NAME="example">EXAMPLE</A></H1>
  76. <PRE>
  77.         print wrap("\t","","This is a bit of text that forms 
  78.                 a normal book-style paragraph");</PRE>
  79. <P>
  80. <HR>
  81. <H1><A NAME="author">AUTHOR</A></H1>
  82. <P>David Muir Sharnoff <<A HREF="mailto:muir@idiom.com">muir@idiom.com</A>> with help from Tim Pierce and
  83. many many others.</P>
  84. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  85. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  86. <STRONG><P CLASS=block> Text::Wrap - line wrapping to form simple paragraphs</P></STRONG>
  87. </TD></TR>
  88. </TABLE>
  89.  
  90. </BODY>
  91.  
  92. </HTML>
  93.