This is interesting. We asume $line could have whitespaces at the begging and/or at the end. So this patch could have sense