Search notes:

Perl module Text::Lorem

#!/usr/bin/perl
use warnings;
use strict;

use Text::Lorem;

my $lorem = Text::Lorem->new;

P ('Nine words'     , $lorem->words     (9));
P ('Three sentences', $lorem->sentences (3));
P ('Two paragraphs' , $lorem->paragraphs(2));

sub P {
  my $title = shift;
  my $text = shift;

  print "\n$title\n  ";

  $text =~ s/\n/\n  /g;
  $text =~ s/(.{50,}?) /$1\n  /g;

  print $text;

  print "\n";

}
Github repository PerlModules, path: /Text/Lorem/script.pl
The output of the script above might be:
Nine words
  hic praesentium sit ipsa aperiam sapiente et sequi
  sunt

Three sentences
  Qui incidunt autem vel itaque quo modi quos eos. Corporis
  corrupti architecto non error dignissimos nobis dolor.
  Dolores est non aut maxime.

Two paragraphs
  Voluptatem aliquam ex quod expedita modi. Commodi eius
  iusto quia provident eum expedita dolorum inventore.
  Molestiae assumenda voluptatem aut consequatur autem
  sed ipsam tempore. Repellat ut vel sit labore et molestiae.
  Ad rerum ut minus voluptatum. Voluptas et impedit ut
  officiis dolorem earum.

  Corrupti ducimus odio corrupti magnam repellendus.
  Necessitatibus sit est aut rerum aliquid voluptas non.
  Aliquid ut consequatur facere quaerat cupiditate.

See also

Perl modules
Text::Wrap for an example on how to break long text such as the one generated with Text::Lorem.
sed testfile: lorem ipsum dolor

Index