Changed hostname call to Perl method