perl -wle' $_ = " total bla"; if(s/^ +total/total/){ $description = $_; } print "<$description>"'