in reply to validations in perl

Is the CGI part necessary to check the password validation?

Please change your code for debugging and remove all the CGI parts. This allows you to easily see the warnings that Perl throws. These warnings will point you o this line:

if ($password != /^[\w\d@#\$%`~!^&*()_\-+={}[\]|\\'";:\/?.><,]{8}$/ )

The binding operator for regular expression matches is ~, not =. So you most likely want !~ there, instead of !=.

Replies are listed 'Best First'.
Re^2: validations in perl
by Ekanvitha9 (Novice) on Jul 17, 2019 at 10:52 UTC

    I have changed != to !~, but no change.The user given password,phone number arguments are calling in perl script for validation.So CGI is necessary in my view.

      I don't think that the CGI parts are necessary for finding out why your code does not work.

      You don't show us how your code fails.

      Please show us code that runs for given values of $employee and $password and fails to do what you think it should do. Please also explain in written English what you expect the program to do, and also how it fails to do what you want.</c>