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 ; $!";