On Wed, 2002-10-30 at 07:49, David Buddrige wrote:
> $TO_sub="$;#";
> $TC_sub="$;@";

obscure.

$; is by default "\034"; thus $TO_sub is "\034#" and $TO_sub is "\034@".
I guess your colleague has manually constructing her own
multidimensional hashes or arrays using these subscript separators.

With a local assignment to $; of one of there separators, you'd be able
to access an element as:

  $foo{$a,$b,$c}

which really means:

  $foo{join($;, $a, $b, $c)} # camel book, 3e, p674

Although this method of emulating multidimensional arrays and hashes
hasn't been deprecated, it's probably more readable to use

  $foo{$a}{$b}{$c}

unless there's some *really* good reason to be concatenating keys, such
as sorting or storing in DBM files, which still probably aren't good
enough reasons to destroy the readability of the code.

My guess is that your colleague has used such separators in a persistent
store of these data structures. But I could be wrong.

-- 
Nigel Wetters, Senior Programmer, Development Group
Rivals Digital Media Ltd, 151 Freston Road, London W10 6TH
Tel. 020 8962 1346 (direct line), Fax. 020 8962 1311
http://www.rivalsdm.com/ <[EMAIL PROTECTED]>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to