Combine licorice, salt, 4 cups milk, and 1/3 cup sugar in a 2- to 3-quart heavy saucepan and heat over moderately low heat (do not let boil), stirring frequently, until licorice is dissolved, 18 to 20 minutes. (If licorice is not completely dissolved, let mixture stand off heat, uncovered, whisking occasionally, 10 minutes.).
Increase heat to moderate and bring milk mixture to a bare simmer.
Stir together cornstarch and remaining 1/2 cup milk in a small bowl.
Whisk cornstarch mixture into licorice mixture and simmer, whisking, 2 minutes to thicken.
Whisk together egg yolks and remaining 2 1/2 tablespoons sugar in a medium bowl until combined well, then add hot milk mixture in a slow stream, whisking. Return to saucepan and cook over moderate heat, stirring constantly, until thermometer registers 170°F Immediately pour through a fine-mesh sieve into a clean bowl and stir in butter until incorporated.
Chill pudding, its surface covered wax paper, until very cold, about 4 hours.
Just before serving, gently whisk pudding, then divide among 6 glasses or bowls.