Here's a quickie:

I need to create a hash index out of a string that looks like this:

loans:a_foo[0]

If I build the index like this:

$rec->{"loans:a_$fld[$i]"} = $tmp{$fld} || '';

perl thinks that $fld[$i] is an array element, which it isn't.

Here are two solutions I found:

$rec->{"loans:a_$fld" . "[$i]"} = $tmp{$fld} || '';
$rec->{"loans:a_$fld\[$i]"} = $tmp{$fld} || '';

Are there any other ways? Just curious.
Luke

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

Reply via email to