]> git.refcnt.org Git - distdns.git/blobdiff - client.pl
Optimize retrieving session identifier
[distdns.git] / client.pl
index 729663f51a3c9a0b37148fddb617b9aa26960326..cbf9b58bc3d62caa185f20a46f0f6410902cf1df 100755 (executable)
--- a/client.pl
+++ b/client.pl
@@ -94,8 +94,7 @@ my $save_session = sub
 my $get_session = sub
 {
     open(my $fh, '<', $session_file) or _die "Cannot open $session_file for reading: $!\nPerhaps try running --init\n";
-    my $session = do { local $/; <$fh> };
-    chomp $session;
+    chomp(my $session = <$fh>);
     close($fh);
 
     return $session;