migas has asked for the wisdom of the Perl Monks concerning the following question:
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_tm +p" ) ) { print "download failed\n"; } else { print "download worked\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using HTTP::DAV
by Anonymous Monk on Sep 19, 2006 at 10:37 UTC | |
by migas (Novice) on Sep 19, 2006 at 10:53 UTC | |
|
Re: Using HTTP::DAV
by Khen1950fx (Canon) on Sep 19, 2006 at 19:16 UTC | |
|
Re: Using HTTP::DAV
by migas (Novice) on Sep 20, 2006 at 08:40 UTC |