Mandatory reading ;-)...
perldoc perlreftut
perldoc perlref
See inline.
------------------------------------------------
On Wed, 27 Nov 2002 14:30:52 +0100, Marija Silajev <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> If you write something like :
>
> $table = {};
>
> is that hash reference? what do you actually initialize?
That stores a hash reference (to an anonymous hash) in $table. try:
print ref($table)
It initializes an empty hash that you can then add key/values to, for instance:
$table->{'newkey'} = 'newvalue';
But again read the perldocs listed at the top.
>
> and than:
>
> somefunction([$table])
>
> what is than [$table] ?
>
I believe, this passes an array reference to somefunction, and that references an
array with a single element $table.
So inside of somefunction you could then say
$_[0]->[0]
which would equal the value of $table.
Again the perldocs should clear things up a lot.
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]