18.221.41.214 |    

Navigation

Google Advertisement

Mit der Funktion is_hash() kann Überprüft werden, ob die angegebene Variable eine Hash ist. Wenn die Variable ein Hash ist wird TRUE (bzw. 1) zurückgegeben, ansonsten FALSE (bzw. 0).

is_hash
  1. # **************************************************************
  2. # This function check if the reference is a HASH.
  3. #
  4. #  @example: print "ERROR: A HASH is needed\n" if ( !is_hash(\%$hash) );
  5.  
  6. sub is_hash {
  7.  
  8. my $ref = shift;
  9. return 0 unless ref $ref;
  10. if ( $ref =~ /^HASH/ ) { return 1; } else { return 0; }
  11.  
  12. }
Parsed in 0.001 seconds at 273.35 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 3 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)