Irritation

Started by Jim Dunn, October 02, 2013, 04:31:06 PM

Previous topic - Next topic

Jim Dunn

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
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

José Roca

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.

Jim Dunn

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!  : )
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

José Roca

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