in reply to trivial wrapping
How about this?
output was:use strict; my $width = 60; while ( <DATA> ) { chomp; my ($len,$more); my $char; next if ( /^[^\w\d]/ ); $char = substr($_,0,1); if ( ($len = length()) < $width ) { $more = $width - $len; print $_ . $char x $more,"\n"; } else { print "$_\n"; } } ## __DATA__ 111111111111111111111 222222222222222222222 333333333333333333333 111111111111111111111 222222222222222222222 333333333333333333333
perl monks1.pl 111111111111111111111111111111111111111111111111111111111111 222222222222222222222222222222222222222222222222222222222222 333333333333333333333333333333333333333333333333333333333333 111111111111111111111111111111111111111111111111111111111111 222222222222222222222222222222222222222222222222222222222222 333333333333333333333333333333333333333333333333333333333333
_
_
_
_
_
_
_
_
_
_
- Jim
Insert clever comment here...
|
---|
In Section
Seekers of Perl Wisdom