Hi Hrishy,
I applied your code and tried to retest. I did the select and it gave me error. Then, I tried to test out changing the password with and without upper case, it will give me the error.

SQL> CREATE OR REPLACE FUNCTION trina_verify_function
2 (username varchar2,
3 password varchar2,
4 old_password varchar2)
5 RETURN boolean IS
6 n boolean;
7 m integer;
8 differ integer;
9 isdigit boolean;
10 ischar boolean;
11 ispunct boolean;
12 isupper boolean;
13 digitarray varchar2(20);
14 punctarray varchar2(25);
15 chararray varchar2(52);
16 regular_expr varchar2(50);
17
18 BEGIN
19 digitarray:= '0123456789';
20 chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
21 punctarray:='!"#$%&()``*+,-/:;<=>?_';
22 regular_expr:= '[A-Z]';
23 if regexp_instr('password','regular_expr') > 0 THEN
24 -- raise_application_error(-20006, 'Password must contain at least one upper case letter.');
25 return true;
26 end if;
27 -- if everything is fine return false.
28 RETURN (false);
29 END;
30 /

Function created.

SQL> show errors
No errors.
SQL> begin
2 if trina_verify_function('TRINA','trina_5555555555','trina') then
3 dbms_output.put_line('True');
4 else
5 dbms_output.put_line('False');
6 end if;
7 end;
8 /

PL/SQL procedure successfully completed.

SQL> begin
2 if trina_verify_function('TRINA','trinA_5555555555','trina') then
3 dbms_output.put_line('True');
4 else
5 dbms_output.put_line('False');
6 end if;
7 end;
8 /

PL/SQL procedure successfully completed.


SQL> select trina_verify_function('TRINA','trinA_5555555555','trina') from dual;
select trina_verify_function('TRINA','trinA_5555555555','trina') from dual
*
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type


SQL> alter user trina identified by trina_33333333333333;
alter user trina identified by trina_33333333333333
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-28003: password verification for the specified password failed


SQL> alter user trina identified by trina_333B333333;
alter user trina identified by trina_333B333333
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-28003: password verification for the specified password failed