Hi My html form is: <FORM ACTION="http://localhost/virtual/webdav_single_file_upload.pl" METHOD="POST" ENCTYPE="multipart/form-data"> <SELECT name="Managers_select"> <OPTION SELECTED value="nothing">Select - - -</OPTION> <OPTION value="Vijay">Vijay</OPTION> <OPTION value="Mr. Naveen">Mr. Naveen</OPTION> </SELECT> File 1: <INPUT TYPE="file" NAME="file1" SIZE=40/> <INPUT TYPE="submit" NAME="Submit" VALUE="UPLOAD"> </FORM> Task: Trying to upload single file using webdav tool with if condition against OPTION SELECTED. My server perl code: webdav_single_file_upload.pl use CGI; use CGI::Carp qw(fatalsToBrowser); use CGI qw(:cgi-lib :standard); use HTTP::DAV; $d = new HTTP::DAV; &ReadParse(%in); $url = "http://www.emantras.com/webdav2/"; $d->credentials( -user=>"vijay", -pass =>"****", -url =>$url); $d->open( -url=>"$url" ) || die("Couldn't open $url: " .$d->message . "\n"); $query = new CGI; $filename = $query->param("file1"); $filename =~s/\\/\/\//gi; if ( $in{"Managers_select"} = "Vijay") ## I am checking condition here with option selected. i.e if I select vijay it should go to put method else it should terminate { $d->put(-local => "$filename", -url => $url); } else { print "Put Failed due to project manager code" . $d -> message . "\n"; } $d->unlock( -url => $url ); print $query->header ( ); print <<END_HTML <HTML> <HEAD> <TITLE>Thanks!</TITLE> </HEAD> <body bgcolor="ffffcc"> <P>file $filename has been uploaded!</P> </BODY> </HTML> END_HTML ; Additionally, Please explain how to call the option selected field value in perl.
-- View this message in context: http://www.nabble.com/Call-option-selected-value-in-perl-script-t1410184.html#a3797941 Sent from the Perl - ActivePerl forum at Nabble.com. _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs