Miscellaneous perl scripts