#!/usr/bin/perl -l use strict; use warnings; use Text::Trim; $|=1; my @strings= <<"EOF"; This is a sentence in a paragraph. This a sentence in a paragraph. This is a sentence in a paragraph. This is a sentence in a paragraph. This a sentence in a paragraph. This is a sentence in a paragraph. EOF my $trimmed = trim(@strings); print "\"$trimmed\"";
In reply to Re: Trim blanks from the beginning and end of a multi-line string
by Khen1950fx
in thread Trim blanks from the beginning and end of a multi-line string
by kenclark
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |