Front page | perl.perl6.language |
Postings from September 2002
Re: Regex query
From:
Aaron Sherman
Date:
September 23, 2002 22:37
Subject:
Re: Regex query
Message ID:
1032845850.15475.131.camel@localhost.localdomain
On Sat, 2002-09-21 at 06:18, Smylers wrote:
> $num = @massive;
>
> C<$num> becomes a reference to C<@massive>, but in a numeric context it
> will evaluate to the number of elements in that array.
>
But in most cases, you would never do this. You would do something like
my int $num = @massive;
or
if @massive {...}
or the like. In both cases, your later concerns about long-lived
references go away.
--
Aaron Sherman <ajs@ajs.com>