Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Trailing spaces to lines less than x characters

by aaron_baugher (Curate)
on Jun 05, 2015 at 18:59 UTC ( #1129238=note: print w/replies, xml ) Need Help??


in reply to Trailing spaces to lines less than x characters

perl -pe 's/.*/$&." "x(76-$+[0])/e' <infile >outfile

Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1129238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2020-06-05 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (35 votes). Check out past polls.

    Notices?