Perl functions references-exists Function - Perl Scripting

what is perl exixts function?

Description

This function returns true if that particular hash or array key exists, regardless of the corresponding value, even if it.s undef. If EXPR is a subroutine, then exists will return 1 if the subroutine has been declared (but not necessarily defined), 0 if not.
If LIST is more than one argument, or an array with more than one value, then the command is executed directly without the use of a shell.

Syntax

Following is the simple syntax for this function −

Return Value

This function returns 0 if hash element or array index does not exist, or if the subroutine has not been declared and 1 if hash element or array index does exist, or if the subroutine has not been declared.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Perl Scripting Topics