in reply to finding colunm header which crossing multiple rows

In order to help you, you should post your input text inside code tags <c>...</c>.

A general answer is to match a regex against the first headline and to count the length of the matches, like that you'll get the width of the columns.

update

DB<17> $_='Name Company Work + Home Work' DB<18> push @col,$1 while /(\w+\s*)/g DB<19> x @col 0 'Name ' 1 'Company ' 2 'Work ' 3 'Home ' 4 'Work' DB<20> print map {":".length $_} @col :11:23:27:27:4

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: finding colunm header which crossing multiple rows
by cscu2007 (Novice) on Nov 16, 2018 at 21:24 UTC
    Thanks LanX.