Get hostname using Perl