# there can be right-flushed fields, e.g. PID from lsof, so check, if there is something to the left of from the index of that label and add it to the string, if necessary
while($idx>0&&(my$x=substr($l,$idx-1,1))ne'')
{
$str=$x.$str;
$idx--;
}
$str=~s#^ *##;$str=~s# *$##;# remove padding blanks from the begin and end