NAME Text::Truncate - Perl module with simple string truncating routine REQUIREMENTS This module only uses standard modules. It should run on Perl 5.004. Installation Installation is pretty standard: perl Makefile.PL make make test make install (On Windows platforms you should use nmake instead.) Using Build.PL (if you have Module::Build installed): perl Build.PL perl Build perl Build test perl Build install SYNOPSIS use Text::Truncate; my $long_string = "This is a very long string"; # outputs "This is..." print truncstr( $long_string, 10); # outputs "This is a-" print truncstr( $long_string, 10, "-"); # outputs "This is a " print truncstr( $long_string, 10, ""); # outputs "This is---" $Text::Truncate::DEFAULT_MARKER = "---"; print truncstr( $long_string, 10); DESCRIPTION This is a simple, no-brainer subroutine to truncate a string and add an optional cutoff marker (defaults to ``...''). More details are in the module documentation. LICENSE This module is in the public domain. No copyright is claimed. AUTHOR Robert Rothenberg