I am reading somebody else's code, always a good learning process. The code is about a telephone contact list. The intent of this line of code is clear: 'does the logged in person have a cell phone, and does the cell phone have the attribute line=dc'
There is one confusing step in the syntax:
if ((@{$info{$loggedin}}{cell}) and (@{$info{$loggedin}}{line} eq 'dc'))
The person who wrote that is using a hash slice. That would more correctly be written as:
if ( $info{$loggedin}{cell} and $info{$loggedin}{line} eq 'dc' )
{stuff to execute}
John -- use Perl; program fulfillment
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>