Re: test value
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 08:46:12 +0200
John Bokma wrote:
Shane <shane@xxxxxxxxxxxxxxxxxxxx> 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 = []
$val contains a reference to an empty array, like:
my @array = ();
my $val = \@array;
if (@$val == 0) {
print "Empty\n";
}
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
.
- Follow-Ups:
- Re: test value
- From: John Bokma
- Re: test value
- References:
- test value
- From: Shane
- Re: test value
- From: John Bokma
- test value
- Prev by Date: Re: test value
- Next by Date: FAQ 4.69 How can I use a reference as a hash key?
- Previous by thread: Re: test value
- Next by thread: Re: test value
- Index(es):
Relevant Pages
|