Help for this page

Select Code to Download


  1. or download this
    use Scalar::Util 'reftype';
    if (reftype ($foo) eq 'ARAY') { # spot the typo
        do_something ();
    }
    
  2. or download this
    use Ref::Util 'is_arrayref';
    if (is_arrayref ($foo)) {
        do_something ();
    }