From 16d993ce5bfa2fe1cf6000aa757bd6cca7e7e750 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sun, 1 Sep 2013 21:49:01 +0200 Subject: Prefix error message with program name --- client.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.pl b/client.pl index 1d03898..86ff3d9 100755 --- a/client.pl +++ b/client.pl @@ -79,14 +79,14 @@ my $save_session = sub { my ($session) = @_; - open(my $fh, '>', $session_file) or die "Cannot open client-side $session_file for writing: $!\n"; + open(my $fh, '>', $session_file) or die "$0: Cannot open client-side $session_file for writing: $!\n"; print {$fh} "$session\n"; close($fh); }; my $get_session = sub { - open(my $fh, '<', $session_file) or die "Cannot open client-side $session_file for reading: $!\nPerhaps try running --init\n"; + open(my $fh, '<', $session_file) or die "$0: Cannot open client-side $session_file for reading: $!\nPerhaps try running --init\n"; my $session = do { local $/; <$fh> }; chomp $session; close($fh); -- cgit v1.2.3