... open (FILE, ">data.txt") or die "can't open file: $!"; my $weather_data = do "data.txt"; ...