You're viewing a comment by Lakshminarasu and its responses.

Lakshminarasu Permalink
December 11, 2015, 11:12

I have a text file which is full of variable length records with tab delimiter.
I need to pad all the lines with blank spaces with tab delimited - such that all the lines are having exactly 103 fields per line.

How can I achieve this in perl ? Can some body please help me

Comment Responses

Anirudh Permalink
February 02, 2016, 12:39
perl -F'/\t/' -pale '$_ .= qq{\t } x (103 - @F) if @F < 103'

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "security_303": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.