# HG changeset patch # User Matti Hamalainen # Date 1450426203 -7200 # Node ID 86adad9096814262086f776b7b950889aa6e421a # Parent ed1c7f2d81dfd61f6a089a6aa8d0b95e843198e4 fetch_weather: Improve debugging and one error message. diff -r ed1c7f2d81df -r 86adad909681 fetch_weather.pl --- a/fetch_weather.pl Fri Dec 18 10:09:32 2015 +0200 +++ b/fetch_weather.pl Fri Dec 18 10:10:03 2015 +0200 @@ -504,8 +504,9 @@ ### if (opt_chk_valid("outfile", 1)) { + print STDERR "Dumping data to ".opt_get("outfile")."\n" if (opt_get_int("debug") > 0); close(STDOUT); - open(STDOUT, '>', opt_get("outfile")) or die("Could not open output file '".opt_get("outfile")."'.\n"); + open(STDOUT, '>', opt_get("outfile")) or die("Could not open output file '".opt_get("outfile")."': $!\n"); } binmode STDOUT, ':encoding(utf-8)';