From: Vincent Pit Date: Sat, 14 Aug 2010 22:20:20 +0000 (+0200) Subject: Tweak host() X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=125e52ff2903768a9859f17b9e4b2dce157b4ea0;p=perl%2Fscripts%2Fxchat.git Tweak host() --- diff --git a/clones.pl b/clones.pl index c735c88..12150e8 100755 --- a/clones.pl +++ b/clones.pl @@ -45,8 +45,7 @@ sub clone_list_str { sub host { my $userhost = lc $_[0]; - my ($host) = $userhost =~ /@([^@]+)$/; - return $host || $userhost; + return $userhost =~ /@([^@]+)$/ ? $1 : $userhost; } sub add {