Re: The syntax of Gnome2::Canvas::Line?

Applications From Scratch:

--- On Sun, 6/15/08, walt <wa1ter myrealbox com> wrote:

From: walt <wa1ter myrealbox com>
Subject: Re: The syntax of Gnome2::Canvas::Line?
To: gtk-perl-list gnome org
Date: Sunday, June 15, 2008, 2:36 PM
muppet wrote:

If the [] style arrays are giving you trouble, i
recommend reading
perlref and the Data Structures Cookbook, perldsc. You
really can't use
gtk2-perl effectively without understanding perl data

Wow, muppet, Sergei, zentara, you folks are wonderful. 
Thanks to your
great help I'm now looking at a bar chart of the Dow
Jones Industrial
Average from 1929 to today :o)  Of course I still have a
long way to
go, but to get this far in less than a week is beyond my

Many of my remaining questions are about perl, not about
gtk, so where
would you go for advice when/if you can't understand
the perl docs?

gtk-perl-list mailing list
gtk-perl-list gnome org

Personal advice WRT references: for the beginning, forget about "->"
as a way to dereference.

Remember just _one_ simple rule: reference inside a pair of curlies
behaves like regular name.


use strict;

my %hash =
  one => 1,
  two => 2

warn "\$hash{one}=$hash{one}"; will print 1

my $hash_ref = \%hash;

warn "\${\$hash_ref}{one}=${$hash_ref}"; # will also print 1

The point is that

hash is equivalent to {$hash_ref}

- as I wrote above.

The same rule applies to array and code references.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]