Perl: curl: (1) Protocol 'http not supported or disabled in libcurl

Solution 1:

Windows doesn't like single quotes in commands. Try using double quotes in the command, using qq{} escaping. Just change one line:

my $file = qq{curl -sS "$url" |};

Solution 2:

Wooble~

"I'm guessing it's the extra single quotes around $url that's causing it"

When I removed the quotes around the '$url' it worked. Quotes worked in redhat perl, but didn't work in my windows perl debugger:

#!/usr/bin/perl
use strict;

use XML::Parser;
use Data::Dumper;

my $url = 'http://intranet.atlanticgeneral.org/directory/directory.xml';
my $output = 'C:\global.gabook';

my $file = "curl -sS $url |";
my $parser = new XML::Parser(Style => 'Tree');
my $tree = $parser->parsefile($file)->[1];

Posting as answer since Wooble didn't.