--On 18.08.2000 14:36 Uhr -0700 David L. Nicol wrote:
> How about backslash, after the type-qualifier?
>
> use %record{
>
>         $\interest_earned += $\balance * $\rate_daily;
> };

I don't really like having backslashes in front of ordinary characters 
anywhere except when I mean them :-) (\n, \t etc.)

In most cases where you'd want a with-type construct you know exactly which 
keys there'll be, so maybe simply adding the keys as lexical variables to 
the block would work:

my $interest_earned=0;

use %record {
   $interest_earned+=$balance*$rate_daily;
};

Yes, this _might_ interfere with already existing variables but I so far 
did not encounter lots of cases where I'd want to use a with block with 
hashes where I'm not sure which keys it might contain...

(sorry if this was brought up already - I'm new to the lists and tried 
scanning perl-language but gave up after some time... )

-- 
Markus Peter - SPiN GmbH
[EMAIL PROTECTED]

Reply via email to