PlanetSquires Forums

Support Forums => General Board => Topic started by: Jim Dunn on October 02, 2013, 04:31:06 PM

Title: Irritation
Post by: Jim Dunn on October 02, 2013, 04:31:06 PM
Yeah... irritation... I'm showing off some cool PowerBASIC COM code to my brother, who has programmed in PERL for 15 years... he said, "um, you can do that with one line of PERL code."

getstore($url, $file) -- save the content of a URL in a file and return the status code

Irritation.

Perl Programming using "Simple LWP" (basic functional interface for web programming (five functions))
1)   get($url) -- get the content of a URL
2)   head($url) -- get the headers of a URL; returns ($content_type, $document_length, $modified_time, $expires, $server)
3)   getprint($url) -- print the content of a URL and return the status code
4)   getstore($url, $file) -- save the content of a URL in a file and return the status code
5)   mirror($url, $file) -- save the content of a URL in a file if it has changed and return the status code
perldoc LWP::Simple for complete description
Title: Re: Irritation
Post by: José Roca on October 02, 2013, 04:49:49 PM
And you can write similar functions with PB and then say that you're using only one line of code by showing only the line that calls the function.
Title: Re: Irritation
Post by: Jim Dunn on October 02, 2013, 08:22:11 PM
Hey Jose, did you see my post (thru Eric) on the PowerBASIC forum, for the guy who was having intermittent trouble with TCP statements?  The COM code I gave him was yours... and worked perfectly for him!!!  GO JOSE!  : )
Title: Re: Irritation
Post by: José Roca on October 03, 2013, 12:41:57 AM
I don't read posts related with DDT.

That example and several more are also available in my subforum in the PB forum:
http://www.powerbasic.com/support/pbforums/showthread.php?t=50409&highlight=ResponseBody