in reply to Getting issue with encrypt / decrypt

Does the program really end where you say it does? Or does it print the final debug statement in that block?

Did you test the return value of your print() statement?

The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: Getting issue with encrypt / decrypt
by merafiq (Initiate) on Jul 23, 2015 at 17:46 UTC
    While I call this file on browser, its showing till the "encrypted binary : xxx" I've tested the file separately - encryption, decryption or reading - perform ok. The code that I used to call this one is
    #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><head>\n"; print "<title>Change Pass</title>\n"; print '<body>'; print '<form action="pass_change.cgi" method="POST">'; print "Old Pass : ".'<input type="password" name="oldpass">'."<br>" +; print "New Pass : ".'<input type="password" name="newpass1">'."<br> +"; print "Confirm Pass: ".'<input type="password" name="newpass2">'."<br> +"; print '<input type="submit" name="sub" value="Change Pass">'; print '</body>'; print '</head>'; print '</html>';
      Add this line temporarily to your pass_change.cgi script.
      use CGI::Carp 'fatalsToBrowser';

      and change this line
      open (my $passfile,'<',$readfile) or die "could not open file";
      to
      open (my $passfile,'<',$readfile) or die "could not open file $readfile ; $!";

      poj