[Nottingham] perl question

Cam camilo at mesias.co.uk
Fri Sep 15 13:12:15 BST 2006


Phil

> my (%trailsByChannel);
> 
> my($channelX,$pathtype,$cctName);
> 
> $trailsByChannel{join '|',($channelX,$pathtype)}->{$cctName} = 1;
> 
> The problem I have is that I dont understand what the 
> $trailsByChannel{join '|',($channelX,$pathtype)}->{$cctName} = 1; is 
> doing.
> 
> Anybody have any ideas have any ideas ?

It looks like trailsByChannel is a hash where the key is a string like 
"foo|bar" where foo is the $channelX and bar is the $pathtype. The data 
value in the hash is a hash reference, where the key is $cctName and the 
data value is 1.

eg.
{
           'foo|bar' => {
                          'baz' => 1
                        }
         };



-Cam

-- 
camilo at mesias.co.uk                                                 <--



More information about the Nottingham mailing list