On Sat, Aug 02, 2003 at 07:10:46PM -0600, Luke Palmer wrote:
: Yeah, I think so. It might be that the first C<@array[0] =
: "something"> is actually valid, and the only things that would be
: invalid would be calling mutating methods on the array itself (like
: C).
Maybe not even that restrictiv
> As I understand it, the comments in the following two subs are correct.
>
> sub foo (@array) {
> my $x = @array[0]; # ok, allowed to read
> @array[0] = "something"; # compile fails because '@array is ro'
> }
>
> sub bar (@array_2d) {
> my $x = @array[0]
As I understand it, the comments in the following two subs are correct.
sub foo (@array) {
my $x = @array[0]; # ok, allowed to read
@array[0] = "something"; # compile fails because '@array is ro'
}
sub bar (@array_2d) {
my $x = @array[0]; # ok, allo