develooper Front page | perl.perl6.language | Postings from March 2005

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

Thread Previous | Thread Next
From:
Chip Salzenberg
Date:
March 26, 2005 15:54
Subject:
Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?
Message ID:
20050326204530.GF1060@perlsupport.com
According to Rod Adams:
> Chip Salzenberg wrote:
> >* As far as I can tell, the choice of spelling an array parameter
> >  C<Array @a> or C<Array $a> is entirely cosmetic: both @a and
> >  $a are capable of holding an Array reference.  Is there actually
> >  a difference, e.g. in how they handle an undefined value?
>
> Uhm... It was my impression that one of those creates an Array of 
> Arrays, and the other just an Array.

Ah, my question had a bug.  What I meant was:

 * As far as I can tell, the choice of spelling an array parameter
   C<@a> or C<Array $a> is entirely cosmetic: both @a and $a are
   capable of holding an Array reference.  Is there actually a
   difference, e.g. in how they handle an undefined value?

-- 
Chip Salzenberg            - a.k.a. -            <chip@pobox.com>
         Open Source is not an excuse to write fun code
            then leave the actual work to others.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About