skip to main | skip to sidebar

Perl note

Friday, January 4, 2008

isArray() in Perl

foreach $item (@array){
if(ref($item) eq 'ARRAY'){
#It's an array reference...
#you can read it with $item->[1]
#or dereference it uisng @newarray = @{$item}
}else{
#not an array in any way...
}
}
Posted by raj at 3:14 AM
Labels: isArray() in Perl

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2008 (12)
    • ▼  January (12)
      • The Subroutine Stack
      • How to Use the Windiff.exe Utility
      • Row and Array Comparisons in postgresql
      • Array Functions
      • Printing an Associative Array
      • Checking the Existence of an Element
      • How to Create a Bullet List in Microsoft Excel
      • installing module
      • isArray() in Perl
      • ordering hash
      • delete duplicate hash value's
      • Finding oldest file in directory
  • ►  2007 (84)
    • ►  December (22)
    • ►  November (6)
    • ►  October (9)
    • ►  September (1)
    • ►  August (41)
    • ►  July (5)

About Me

raj
View my complete profile