curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Identical call from Perl does not work

From: ToddAndMargo <>
Date: Fri, 31 May 2019 21:50:08 -0700

On 5/31/19 7:41 PM, ToddAndMargo wrote:
> Hi All,
> Fedora 30
> curl-7.64.0-6.fc30.x86_64
> I wrote a Perl 6 module that interfaces with curl.  If
> I send it "-v", its prints out the run string and
> the -v data as well.
> On this "one" site, I can not figure out why I can run the
> echo'ed command from the  command line but download an error
> report when running it from Perl.
> What the heck?
> -T

Figured it out.

I changes this line:

( $ReturnStr, $CurlStatus ) = CurlDownloadFile( "--referer
''", "-v " ~ $ClickHere,
$NewFileName, %MaxTime<MaxTime4>, True );


( $ReturnStr, $CurlStatus ) = CurlDownloadFile( "--referer", "-v " ~ $ClickHere, $NewFileName,
%MaxTime<MaxTime4>, True );

The mistake was the single qutoes around

And the reason it worked from the command line and not Perl
was that the command line was within the shell (bash)
and perl was running the command outside any shell.

Quotes used outside of the shell are pasted to the program
making curl think the quotes were part of the address.

Received on 2019-06-01