naresh777 has asked for the wisdom of the Perl Monks concerning the following question:

I am new using perlmodule functions.By using svn:client i am trying to read a file from working directory and copy a file to same directory and add a new file then update and commit it. but i am geeting problems with add function and update -- Is this what i am doing right or wrong if not please help me with right code.

use SVN::Client; use SVN::Wc; use SVN::Core; use SVN::Repos; use SVN::Fs; my $ctx = new SVN::Client( auth => [SVN::Client::get_simple_provider(), SVN::Client::get_simple_prompt_provider(\&simple_prompt, +2), SVN::Client::get_username_provider()] ); my $target ='https://xxxxxxxxxx.org/svn/sandbox/trunk/'; $ctx->cat (\*STDOUT, $target.'script1.txt','HEAD'); #reading a file this is working perfect $ctx->add ("$target.newfile");# i am unable to add a file $ctx->copy("$target".'script1.txt',32,"$target".old6);# it is creating + a copy of file but i am unable to see in working directory. when i d +o "svn update" manually from CMD it gets updated and i can see a copy + of file. #$ctx->update("/home/xxxx/trunk/"); my $res = $ctx->commit(["/home/xxxx/trunk/"], 1); $ctx->update("/home/xxxx/trunk/"); sub simple_prompt { my $cred = shift; my $realm = shift; my $default_username = shift; my $may_save = shift; my $pool = shift; print "Enter authentication info for realm: $realm\n"; print "Username: "; my $username = <>; chomp($username); $cred->username($username); print "Password: "; my $password = <>; chomp($password); $cred->password($password); }