Re: test value




Shane wrote:
I have some nasty code, that I want to check the value of something held in
a scalar, but there is 'no' value held in there

Data::Dumper tells me the $val = []

How do I test for that?

--
Rule 6: There is no rule 6

Blog: http://shanes.dyndns.org

if (ref $val eq 'ARRAY' && @$val == 0) { ... }

.