Hello list. I'm a absolute beginner in Perl. I have some questions about it:
1. I have installed Perl in my machine - windows 2000. It creates a dir c:\Perl\bin.... 2. How do I run the samples scripts in the browser? For example, in dir C:\Perl\eg\Core\cgi have a lot of samples. 3. If I type "perl script.cgi" or "perl script.pl" in my prompt, it appears perfectly, but I have to test it in a browser. Do I have to start any Internet Server before? What? Thanks a lot. -------------- Adriano Sastre Vieira Especialista em Sistemas Jr Inatel Competence Center - www.inatel.br ----- Original Message ----- From: "Rasoul Hajikhani" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 03, 2002 3:26 PM Subject: open3 > Hello folks, > I am using open3 to create a commumnication channell to gnupg. I am > writing a web based interface for encrypting and decrypting files. I am > having a lot of trouble with decrypting messages. Here is a piece of > code form my programme: > > # This is actual code in perl > $cmd = "--homedir $home --decrypt $encryptFile"; > # Execute user defined routine > # open3($fin, $fout, $ferr,"$self->{GPGExec} $cmd") || return > EXEC_ERROR(); > my $result = $self->Execute($cmd,FIN,FOUT,FERR); > > # this passes in the passphrase > print FIN "$passPhrase\n"; > > # this closes the communication channel, > # indicating we are done > close FIN; > > my @error_output = <FERR>; # reading the error > my @plaintext = <FOUT>; # reading the output > > # clean up... > close FOUT; > close FERR; > > And here is my Execute routine: > sub Execute > { > my ($self,$commands,$in, $out, $err) = @_; > > my ( $fin, > $fout, > $ferr, > ); > > # Put the file descriptors in the callers package > $fin = (caller)[0] . "::$in"; > $fout = (caller)[0] . "::$out"; > $ferr = (caller)[0] . "::$err"; > > my $result = undef; > > my $cmd = shift(@$commands); > > Debug ("secureDB::GPG::Exec=$self->{GPGExec} $cmd"); > > $ENV{GNUPGHOME} = $self->{GNUPGHOME} || > GNUPGHOME; > > my $pid = open3($fin, $fout, > $ferr,"$self->{GPGExec} $cmd") || return EXEC_ERROR(); > } > > Can any one help me debug this thing? > I appreciate all the help that I can get. I am using perl 5.053 with > mod_perl version mod_perl/1.24_01 > Thanks in advance > -r > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]