# HG changeset patch # User Matti Hamalainen # Date 1450426172 -7200 # Node ID ed1c7f2d81dfd61f6a089a6aa8d0b95e843198e4 # Parent 1ca8ae1950772c14432689556057e35679234a8a fetch_weather: Close STDOUT filehandle before reopening it, to make sure we are actually writing data to the intended output. diff -r 1ca8ae195077 -r ed1c7f2d81df fetch_weather.pl --- a/fetch_weather.pl Fri Dec 18 10:07:35 2015 +0200 +++ b/fetch_weather.pl Fri Dec 18 10:09:32 2015 +0200 @@ -504,6 +504,7 @@ ### if (opt_chk_valid("outfile", 1)) { + close(STDOUT); open(STDOUT, '>', opt_get("outfile")) or die("Could not open output file '".opt_get("outfile")."'.\n"); }