in reply to I'm confused... using Geo::Weather

Your problem is probably that you're running on a unix system and don't have the hash-bang line correct. On my system I used:
#!/usr/bin/perl -w use strict; use Geo::Weather; my $weather = new Geo::Weather; my $current = $weather->get_weather('19067'); print "The current temperature is $current->{temp} degrees\n";
and it ran fine. 80 degrees. If you leave out the first line altogether, it will probably try to run it with /bin/sh, which gives odd errors when it sees Perl...
--
Snazzy tagline here

Replies are listed 'Best First'.
Re: Re: I'm confused... using Geo::Weather
by Sabacthani (Novice) on Jun 25, 2001 at 23:15 UTC
    No, I must've missed the first line when I pasted... regardless, when I cut-and-pasted your code (with the #!, and yes, /usr/bin/perl is the correct path on my system...) I still get that infernal error!
    Also, if I use $weather->report(); instead, I get an error from the perl module itself... The same hash ref error.

    Thank you for your time,
    Benjamin
      I get the same error when I run the code on a Win32 system. Using the code on the Aighearach's reply.

      --BigJoe

      Learn patience, you must.
      Young PerlMonk, craves Not these things.
      Use the source Luke.
      What is your perl version?
      --
      Snazzy tagline here
        When I first wrote about Geo::Weather it worked quite well, but now it seems it doesn't. When I ran the code in Aighearach's reply (which still has my zip code in it :) I ran it and it just went into World wide Wait. I don't know what's happened to it but it seems to have stopped working all together.

        $_.=($=+(6<<1));print(chr(my$a=$_));$^H=$_+$_;$_=$^H; print chr($_-39); # Easy but its ok.