18.118.2.15 |    

Navigation

Google Advertisement

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

is_array
  1. # **************************************************************
  2. # This function check if the reference is an ARRAY.
  3. #
  4. #  @see: http://affy.blogspot.com/p5be/ch08.htm
  5. #  @example: print "ERROR: A ARRAY is needed\n" if ( !is_array(\@$array) );
  6.  
  7. sub is_array {
  8.  
  9. my $ref = shift;
  10. return 0 unless ref $ref;
  11. if ( ref($ref) eq "ARRAY" ) { return 1; } else { return 0; }
  12.  
  13. }
  14.  
Parsed in 0.001 seconds at 270.88 KB/s

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

User online
There are 1 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)