in reply to Removing Preformatted Word Wrapping
Please try the following:
#!/usr/bin/perl -w use strict; $_ = join '=' x 79 . "\n", map {scalar `fortune`} 1 .. $ARGV[0] || 1; s{\n} { my ($a, $b) = ($`, $'); ($a =~ /[a-z] *$/ && $b =~ /^ *[a-z]/) ? ' ' : "\n"; }ge; s/(?<=[\w.,]) +/ /g; print;
|
|---|