Matthew Perry sworn in as federal district judge