# pass in multi-paragraph English text sub calculate_rows_from_content($) { my ($content) = @_; # hard wrap $content =~ s/([^\n]{80})/$1\n/g; # count newlines + 3 my $rows = 3; $rows++ while ($blurb =~ /\n/g); return $rows; }