Re: Geo::WebService::Elevation::USGS

2019-08-28 Thread Olivier
Mike writes: > Thanks for the response. > > Yeah, I don't understand why > https://nationalmap.gov/epqs/pqs.php > won't open in a browser, but In fact, it does open in a browser and the result is "General failure: Invalid Coordinates". This URL runs the PHP script pqs.php, this script needs

Re: Geo::WebService::Elevation::USGS

2019-08-28 Thread Andy Bach
The url ending pgs.php requires the query_string data to be looked up. The url ending in “/“ is for the interactive page for a browser, say. You shouldn’t have to specify “:443” (from your 500 error) instead just use “https://“ prefix. In general http connections forward themselves to https; if I

Re: Geo::WebService::Elevation::USGS

2019-08-28 Thread Mike
Thank you.  That helps me a lot to know that it works for you. Your code, exactly as you sent it, still does not work for me. It gives: 500 Can't connect to nationalmap.gov:443 (Bad address) at trash.pl line 19. I'm going to try to assign an environment variable to my system.  I doubt that

Re: Making use of XML::Feed->parse() more robust

2019-08-28 Thread Andy Bach
Look at eval blocks - lets you trap fatal errors from other code and not die/abort yourself. https://perldoc.perl.org/functions/eval.html You can also wrie your own signal handling code https://www.perl.com/article/37/2013/8/18/Catch-and-Handle-Signals-in-Perl/ On Wed, Aug 28, 2019 at 8:42 AM

Making use of XML::Feed->parse() more robust

2019-08-28 Thread Lars Noodén
I've been using the CPAN module XML::Feed to parse Atom and RSS feeds. Some of the feeds it fetches are a little broken from time to time and when that happens the parser produces and error and stops the program. I'd like it to just keep going. I am invoking the parser inside a subroutine like

Re: Geo::WebService::Elevation::USGS

2019-08-28 Thread Mike
Thanks for the response. Yeah, I don't understand why https://nationalmap.gov/epqs/pqs.php won't open in a browser, but https://nationalmap.gov/epqs/ will.  I imagine this may have something to do with redirects, but who knows. When I put https://nationalmap.gov/epqs/pqs.php into a web