Add filename to dying message
@@ -23,7 +23,7 @@ my $sock = IO::Socket::INET->new(
) or die "Failed to create a UDP socket: $!\n";
for my $f (@ARGV) {
- my $fh = IO::File->new($f, "r") or die "Failed to open file: $!\n";
+ my $fh = IO::File->new($f, "r") or die "Failed to open file: $f: $!\n";
my $read = $fh->read(my $dgram, 1500); # 1500 bytes must be enough to store the entire datagram at the moment
undef $fh;
my $sent = $sock->send($dgram) or die "Failed to send a datagram: $!\n";
