Please instead use:
if( UNIVERSAL::isa( $hash{$key}, "ARRAY" ) ) { dosomething( @{ $hash{$key} } ); } else { dosomething( $hash{$key} ); }
This makes your code work for non-ordinary array references.
- tye (but my friends call me "Tye")In reply to Re: Finding variable context
by tye
in thread Finding variable context
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |