The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

weather.pl - Show the weather forecast for a city

SYNOPSS

    C:>perl weather.pl netherlands "den helder"

DESCRIPTION

This program opens an IE with http://www.worldweather.org and tries to find the country and city specified to show the current weather forecast.

It does try to do "fuzzy matching" with soundex if no direct match is found.

SUBS

find_place( $a, $c )

Make an effort to find a link and return the link-object or undef.

If we do not find a "direct hit", use soundex() to try harder. Return the first soundex match.

find_country( $a, $c )

Find a country in the selectbox and return the value of the option.

pick_country( $a )

Try to pick a country from the list in the select-box.

pick_city( $a )

randomly pick a link from the page...

COPYRIGHT AND LICENSE

Copyright MMV, Abe Timmerman <abeltje@cpan.org>. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.