Deal of the Day

Home » Main » Manning Forums » 1999 » Object Oriented Perl

Thread: page 231. subroutines as attributes: arrow operator

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
herberjg

Posts: 2
From: NH, USA
Registered: 8/26/06
page 231. subroutines as attributes: arrow operator
Posted: Nov 19, 2006 10:45 PM
  Click to reply to this thread Reply

Can anyone clarify what the expression $a->val in the code sub { $a->val <=> $b->val } signifies.

It should be "set to" an item from the list returned by $self->data. It looks somewhat like a dereferenced hash element, but there aren't any curly braces (it isn't $a->{val}. Is val a function that isn't listed?

Thanks for any help.

gerald.

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff