> $array[112]='a';
> but there isnot any array with this name.why?

1. perhaps the programmer made a mistake. execute perl with -w
to find out more.

2. the array name is @array. are you sure there isn't an @array?

3. you merely have to mention a variable or element of an array
or hash, and it will spring into existence as necessary (occasionally
when you might not expect, but mostly it does what you expect).


> and for initialize the array,what is the meaninig of  '\' in 
> %array(id=>\$var)

a reference to $var

say $var is 5 when you do the above line.

if you then say:

    $foo = \$var;
    print $$foo;

you get 5.

if you then do:

    $var = 6;
    print $$foo;

you get 6.



hth


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to