use warnings; use strict; my $len = 30; my $address = '123 Main St NE'; $address =~ s/ +/ /g; $address = sprintf "%-${len}s", $address; print ">>>$address<<<\n"; __END__ >>>123 Main St NE <<<
In reply to Re: Remove whitespace in string and maintain overall length
by toolic
in thread Remove whitespace in string and maintain overall length
by silentbob343
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |