All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Olszewski <ray@comarre.com>
To: linux-newbie@vger.kernel.org
Subject: Re: GrabWeather Error
Date: Wed, 12 Jul 2006 23:31:45 -0700	[thread overview]
Message-ID: <44B5E8D1.60401@comarre.com> (raw)
In-Reply-To: <200607130308.k6D3862l027479@skyinet.net>

Peter -- Since the error is from an unitialized variable, the obvious 
thing to try is to initialize it with a harmless default value. Add a 
line something like this one:

 > my ($StationInfo, $UpdateTime, $SkyConditions, $CodedMETAR);

$SkyConditions = " "	;

 > while (<TmpFile>)

I'm assuming this is Perl code; it looks like Perl.

Peter wrote:
> Hi,
> 
> If I invoke GrabWeather I get the following error:
> 
> Use of uninitialized value in concatenation (.) or string at 
> /usr/local/bin/GrabWeather line 200.
> 
> Line 200 reads:
> 
> print TmpFile "$SkyConditions\n";
> 
> before that there are lines referring to sky condition:
> 
> -----------
> my ($StationInfo, $UpdateTime, $SkyConditions, $CodedMETAR);
> 
> while (<TmpFile>)
> {
> 		chop;
> 			
> 		if ($Flag == 0) { $StationInfo = $_; };
> 		if ($Flag == 1) { $UpdateTime = $_; };
> 		if (/^Sky conditions:/)
> 		{ 
> 				$SkyConditions = $_; 
> 				$SkyConditions =~ s/Sky conditions: (.*)/$1/; 
> 		}
> 
> ------------
> 
> Does anyone know how to fix this?
> 
> In the meantime I just uncommended line 200.
> 
> GrabWeather works just the same.
> 
> Thanks & regards

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2006-07-13  6:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13  3:08 GrabWeather Error Peter
2006-07-13  6:31 ` Ray Olszewski [this message]
2006-07-14  4:11   ` Peter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44B5E8D1.60401@comarre.com \
    --to=ray@comarre.com \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.