Section 5. No corporation, unless authorized by a special act still in force, shall purchase, acquire, take or hold, directly or indirectly, more than ten per cent of the total capital stock of any domestic corporation authorized to carry on within the commonwealth the business of a railroad, street railway, electric railroad, elevated railway, trolleymotor, or gas company; provided, that the foregoing provisions shall not prohibit a corporation having its principal place of business in the commonwealth from purchasing, acquiring, taking or holding more than ten per cent of the capital stock of a domestic corporation carrying on within the commonwealth the business of a gas company.