View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Gábor Egressy > Text-Format0.46+NWrap0.11 > Text::NWrap

Download:
Text-Format0.46%2BNWrap0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.11   Source   Latest Release: Text-Format0.52+NWrap0.11

NAME ^

Text::NWrap - a simple text wrapping module

SYNOPSIS ^

    use Text::NWrap;

    $NWrap::columns = 132;
    NWrap::wrap('    ','',@text);

DESCRIPTION ^

Text::NWrap is a simple interface to Text::Format. If you want more functionality just use Text::Format. Text::NWrap is meant to replace Text::Wrap. Its interface is basically identical to Text::Wrap's.

wrap $firstIndent, $bodyIndent, @text

Wrap @text using $firstIndent for the first line's indent and $bodyIndent for the indentation of the body of the paragraph.

$columns

Lets you set the width of the paragraph. Default is 72 characters wide.

EXAMPLE ^

    use Text::NWrap;

    print NWrap::wrap('','',"hello world this is some silly example",
            " and some more text");

    use Text::NWrap qw(wrap $columns);

    $columns = 20;
    wrap("\t",'',"some text that should be wrapped");

AUTHOR ^

Gabor Egressy gabor@vmunix.com

Copyright (c) 1998 Gabor Egressy. All rights reserved. All wrongs reversed. This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.

syntax highlighting: