my $special_error_flag = 0; my $network_connection_p= new HTTP::DAV; # create the web dav object $network_connection_p-> DebugLevel(2); $network_connection_p-> credentials( -user=>"someuser",-pass => "somepass", -url =>"http://localhost:8080/webdav" ); $network_connection_p-> open( -url=>"http://localhost:8080/webdav") or $special_error_flag = 1; # attempt to open a connection into the web dav server if ( $special_error_flag == 1 ) { # check if we manage to connect print "failed connecting into web dav server } my $from_file = "http://localhost:8080/webdav/teste.rar"; my $to_file_tmp = "c:\\teste_file.rar"; # with relative paths this also fails #my $to_file_tmp = "teste_file.rar"; if ( !$network_connection-> get( -url=>"$from_file", -to=>"$to_file_tmp" ) ) { print "download failed\n"; } else { print "download worked\n"; }