in reply to Re: Using undef scalar as arrayref
in thread Using undef scalar as arrayref
The only caveat i can think of is that if the $arrayref got set to an empty arrayref, i'd still not want to do the if conditional (in this situation). So i think the final will be:
which will throw an exception if its not an arrayref.if ( $arrayref && @$arrayref ) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using undef scalar as arrayref
by Joost (Canon) on Aug 12, 2005 at 20:44 UTC | |
by shemp (Deacon) on Aug 12, 2005 at 21:07 UTC |