in reply to Formatting screen output
sub centerlines { my $width = shift; print map { ' ' x int($width/2 - length($_)/2) . $_ } @_; } centerlines($width, 'These', 'lines', 'are', 'centered');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Formatting screen output
by Anonymous Monk on Jan 09, 2002 at 02:27 UTC |