From: Robert 'phaylon' Sedlacek Date: Mon, 21 May 2012 22:30:30 +0000 (+0000) Subject: Remove whitespace around hostname X-Git-Tag: v0.001_001~66 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=97d232ad997c8628590bea9f262737d1048c40f5;p=scpubgit%2FSystem-Introspector.git Remove whitespace around hostname --- diff --git a/lib/System/Introspector/Host.pm b/lib/System/Introspector/Host.pm index 0cc0658..6fd49ca 100644 --- a/lib/System/Introspector/Host.pm +++ b/lib/System/Introspector/Host.pm @@ -45,6 +45,7 @@ sub _gather_hostname { my ($self) = @_; my $hostname = output_from_file '/etc/hostname'; chomp $hostname; + $hostname =~ s{(?:^\s+|\s+$)}{}g; return $hostname; }